Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7951531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:35:24+00:00 2026-06-04T02:35:24+00:00

This issue has been driving me up a wall. I’ve been working on a

  • 0

This issue has been driving me up a wall.

I’ve been working on a mobile website for a friend who uses wordpress. I’m attempting to modify a wordpress plugin that “rethemes” each page for mobile users. I want the plugin to do it’s normal thing (“retheme” the page) iff the user is on the blog page, otherwise (if the user visits a different page, he will be redirected to a different address (the address of the mobile website).

In order to do this, I have to be able to detect whether I’m on the blog page, or a different page when the functions in the plugin are run.

I tried condtionals like is_home, is_page(id), ect., but none of them work. I also tried parsing the url and attempting to determine the page that way, but I can’t.

I’m just getting my feet wet with PHP, so I’m really not sure what to try next.

To restate my question: How can I determine whether I’m on a certain page within a wordpress plugin function?

The plugin, for the record, is “WordPress PDA & iPhoned” (http://imthi.com/wp-pda/)

Here’s the relevant code:

function PDAPlugin() {
        if(true) {
        header("Location: http://adavidcreation.com/mobile");
        exit;
        }
...
}

This works, but I want to change the if statement to only be true if it’s NOT the blog.

Any help would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:35:26+00:00Added an answer on June 4, 2026 at 2:35 am

    Try using this, which should retrieve the page id: $id = get_option('page_for_posts');

    If this doesnt work -> https://wordpress.stackexchange.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so I am having this issue that has been driving me crazy for hours,
This issue has been driving me crazy all morning. I've been trying to get
This issue has been bugging me for the past several days. I've been working
This issue has been driving me insane. On two separate projects (both of which
I know this issue has been touched on here but I have not found
This has been a rather problematic issue on numerous occasions. We have alot of
Has anyone else had this issue and found a working solution? I've enabled the
I have an AutoMapper issue that has been driving me crazy for way too
This one has been driving me nuts for a few days now and I've
Update: This issue has been resolved. I was trying to authenticate various admin accounts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.