WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Thanks for taking the time to check this out. I know it's outdated, but I'm using Wordpress 3.2.1.

I have a Custom Home Page - where I created a Page for it and titled it as my Home Page with the custom URL.

I was hoping someone on here will know how to target the Custom page (whether by PHP, Javascript, etc), so that if it's on the home page, I can change the menu-item-225 to have a class of current_page_item.

On my header.php, I have the following code.

if (is_home()) {
        wp_nav_menu(array('depth'=>0,'menu_class' => 'mainNavigation','container_id' => 'navwrap','menu'=>'Main Menu','link_before'=>'<span class="navspanFront">','link_after'=>'</span>'));                   
        else {
            wp_nav_menu(array('depth'=>0,'menu_class' => 'mainNavigation','container_id' => 'navwrap','menu'=>'Main Menu','link_before'=>'<span class="navspanFront">','link_after'=>'</span>'));                   
share|improve this question
You know that the support idea behind WP is only supporting the current version? – kaiser Jul 4 '12 at 1:07
up vote 0 down vote accepted

Rather than adding a class, just add a second selector to your .current_menu_item style of .home .menu-item-225. Not ideal, but for a single case, I think it's completely appropriate.

(This assumes that you're using body_class() on your <body> element, but you should be doing that anyway.)

share|improve this answer
Thank you so much mrwweb - I didn't think about doing it this way. – Nina Jul 6 '12 at 16:09

Your Answer


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.