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!

1 Answer
1

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' ) )

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *