Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm developing a website using WordPress 3.3.2 and have the Front Page and Posts Page set to use static pages. I'm trying to show different menus using wp_nav_menu() for the static front page and static posts page respectively.

I was able to find is_front_page() to check for the front page, however after hours of banging my head against the WordPress Codex and checking the mighty Google I can't find a comparable function or method to check if the user is currently on the static posts page.

Has anyone run into this? Any help would be greatly appreciated!

share|improve this question

1 Answer 1

up vote 4 down vote accepted

There are two options:

// If the current page is the blog posts index,
// but is NOT the site front page
if ( is_home() && ! is_front_page() )

or

// If the current page has the ID of the
// page assigned to display the blog posts index
if ( is_page( get_option( 'page_for_posts' ) )
share|improve this answer
    
You sir are awesome; thank you! –  dSquared Jun 11 '12 at 22:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.