For example:

In the client site I have 5 page 1) Home 2) product 3) Services 4) Contact us 5) Blog

Only from the blog page I want to remove 2) product and 3) Services but not from other pages.

Is there any Plugin to do this?

  • Is it a problem if you have to create the menu twice? Once the full menu, and once for the blog pages? It's very easy to define two menus, and show one of them depending on the page you are on.
    – Jan Fabry
    Jan 25, 2011 at 8:31
  • would this help ? wordpress.org/extend/plugins/exclude-pages Jan 25, 2011 at 12:14
  • no it's exclude page for navigation for each page Jan 25, 2011 at 13:59
  • @Jan Fabry - How to DO thAT? Jan 25, 2011 at 14:00

3 Answers 3


You can register multiple menus, and display one of them depending on the context.

register_nav_menus( array(
    'primary' => 'Regular',
    'blog' => 'Blog',
) );

enter image description here

Then in your theme, you select the menu you want:

wp_nav_menu( array(
    'theme_location' => (is_page() ? 'primary' : 'blog'),
     'menu_id' => 'nav'
) );
  • But in my admin "Heade" and "Footer" navigation showing, not regular and blog farm6.static.flickr.com/5017/5389285912_c40b6f934e.jpg Jan 26, 2011 at 2:46
  • And I don't want 2 menu at same page. I need different top navigation for "Blog" page and for any page comes under blog/ Jan 26, 2011 at 2:55
  • @metal-gear-solid: You don't have to use two menus on the same page. The idea is that you create multiple potential menus in the admin area, and then in your template you choose which one to display via the theme_location parameter.
    – Jan Fabry
    Jan 26, 2011 at 9:05
  • "in your template you choose which one to display via the theme_location parameter" How to do this , please tell. Jan 26, 2011 at 9:21
  • @metal-gear-solid: As I said: with the theme_location parameter. With register_nav_menus() you register multiple menus, where the key of the array is the theme_location. With the wp_nav_menu you can specify which of these menus you want to display.
    – Jan Fabry
    Jan 26, 2011 at 9:27

use conditional tags like


It depends on how your page links are added. Are they listed through wp_list_pages()? Manually?

Regardless of how you've done it, you will be able to exclude particular page links on certain pages by using conditional tags.

For example:

if (!is_page('contact-us'))
// pages to list when not on the contact page
  • you mean I will have to make different template for the page and add this code Jan 24, 2011 at 18:35
  • Menu is created by Wordpress 3.0 Menu templatic.com/wp-content/uploads/2010/05/menu_ui_active.gif Jan 24, 2011 at 18:40
  • I think you can add that code to the header, actually.
    – Lynne
    Jan 24, 2011 at 19:31
  • @Lynne - what i need to put inside { // pages to list when not on the contact page } and how? Jan 24, 2011 at 20:14
  • Ah, as you're using the 3.0 menu system, this is a much more difficult task.
    – Pippin
    Jan 25, 2011 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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