Hide Pages From Menu List In WordPress Blog

hide_pages_wordpress Sometimes you don’t want to show some of the pages from your wordpress blog under the menu navigation or if number of pages are more then it is not advisable to show all of them over there. There are couple of ways to achieve this in a wordpress blog.

1. Edit the theme file (header.php) or where the Manu navigation is present

 

In most of the WordPress themes, Menu Navigation Code appears in header.php where you will have to make some changes. The navigation code should be something like this,

   1:  <?php wp_list_pages('depth=1&title_li='); ?>

You will have to find the Page-ID of the pages which you want to hide from the menu. Page-ID is similar to the Post-ID which you can find by editing the same page from your WordPress admin. The ID will appear in the URL of that edit page.

Change the above piece of code to the below mention code where I have to exclude the page with Page-ID 462 from the Menu List,

   1:  <?php wp_list_pages('depth=1&exclude= 462&title_li='); ?>

This is one way to hide the page from menu list or wordpress blog.

If you have to hide multiple pages from the menu list, then write the Page-ID of all the pages separate by a comma (,) in the above piece of code. For example, If I need to hide the pages with Page-ID 462, 302,120 then the code would be,

   1:  <?php wp_list_pages('depth=1&exclude= 462,302,120&title_li='); ?>

That’s it! Now these pages will not appear in the menu list of your wordpress blog. Now we will talk about the second way to see how to hide pages from menu list in a wordpress blog.

 

2. Use Exclude Pages Plugin

exclude_pages

WordPress users always feel good because of the plug-ins provided by different authors. This time it is Simon Wheatley who provided a Plugin named “Exclude Pages” to hide a page from the menu list. Here you will find a check-box against each page by which you can control their appearance on the menu list.

This Plugin is compatible with the wordpress version 2.2.3 and higher. It is tested with 2.7.1 as well.

Plug-ins are always easier to install and use in a wordpress blog where you just need to “Activate” it thru the Plug-in section of the blog admin. 

By using these techniques, you can manage your pages and theme design as your way and provide the highlight to some important pages by giving them space  in Menu List.

Hope you liked the trick and it helped you in achieving a nice look for your blog. Don’t forget to subscribe this blog for getting the future updates in your mailbox. Follow me on Twitter to get latest updates and cool tips every hour.

Print This Post
RSS for Internet Techies Hello there! If you are new here, you might want to subscribe to the RSS feed for updates.

Featured Jobs On Internet Techies
Sr ETL Developer /Informatica Expert at Leading Interactive Digital Agency (New York, New York) : We are a leading interactive digital agency who partners with media, entertainment, and hospitality brands to create new business capabilities that maximize the opportunities of the digital age. The e...
Hardware Specialist at Confidential (Marlborough, Massachusetts) : For my client, this role is responsible for acting on, closing, and generating sales opportunities from warm leads with little cold calling. Proactively communicates with prospects and existing custom...
5 Responses to “Hide Pages From Menu List In WordPress Blog”
  1. [...] those icons in .PNG and .ICO format and use them according to the license of that icon. License and Designer of that particular icon can be visible by clicking on the “Info” button provided on each icon. [...]

  2. Adam says:

    I have found the ‘Exclude Page’ plugin very useful.

    Adam’s last blog post..Control WordPress Navigation – Exclude Pages

  3. Karabas says:

    Many thanks, I Was trying unsuccessfully 2 Plugins before, but this way is much easy and works fine

  4. Thanks for the code snippets was trying for a whiel to do this… oh what a difference a semi-colon makes!

Sorry, the comments are closed on this page. Please use the below link to post us a query.