[wp-hackers] Static Front page setting, accessing from a plugin?
John Eckman
eckman.john at gmail.com
Sun Jan 3 20:43:31 UTC 2010
Hello and happy new year all.
Is it possible to access, from inside a plugin, whether the user has set a static homepage, and if so, what they have as their posts-page?
(I'm talking about the settings in Settings->Reading where you can set a "static page" as the home page and then set another page for use as your posts page).
I'm working on a plugin where it makes sense that under some conditions you might want to override that "static home page" setting and display the regular "posts page" instead - but I can't see any simple way to do that.
It seems that I can check for these two conditional tags: (is_front_page() && (!is_home()))
Which tells me when I am loading the front page and I'm NOT in the default "list of blog posts" page. (Because is_home will be false on the static front page, but is_front_page will be true).
But how can I then "redirect" to what the posts page is, when that condition is true?
Thanks for any pointers and sorry if I missed an RTFM somewhere . . .
----------------------------------------
John Eckman
eckman.john at gmail.com
More information about the wp-hackers
mailing list