[wp-hackers] "Posts page" feature and is_page()

Andy Skelton skeltoac at gmail.com
Fri Mar 28 02:53:28 GMT 2008


On Thu, Mar 27, 2008 at 9:27 PM, Eric Marden <wp at xentek.net> wrote:
> Maybe its just K2 (getk2.com) but I can't seem to use is_page('2') to
>  test for the page I've set using the Options > Reading > "Posts page"
>  option.
>
>  Is there a way to tell what page you're on when using this setting?

Guessing:

is_page() && $wp_query->get_queried_object_id == get_option('page_on_front')

Cheers,
Andy


More information about the wp-hackers mailing list