How to hide Pages in WordPress

Wordpress by default displays all the pages and the sub-pages you create in the main menu or the navigational menu of your blog. However, there are situations where we don’t want certain pages from being displayed on the main menu but still retain their functionality. Sometimes when you have too many pages in your blog, your navigational menu starts overflowing from one horizontal line into two and more …

In the article, I will tell you how you can hide pages in WordPress and prevent them from showing up on the navigational menu of your blog.

Method 1 : Write and save a page as a Draft

Yes, this simple method lets you retain all the functionality of a page. You can still access this page by searching for it and this page will still be accessible if you type in the URL of that particular page.

So, create a page as usual and then under Page Status menu on the right hand side, choose Draft and hit save

Method 2: Edit your theme’s header.php

* From your Wordpress Dashboard, go to Presentation and Theme Editor and then select header.php from the options on the right hand side

* Look for wp_list_pages() tag. You will usually find this under a div id of top nav or something else that represents your blog’s navigational menu. This tag usually looks like this <?php wp_list_pages(’title_li=&depth=-1′); ?>

* Now go to Manage and then choose Pages from your WordPress dashboard. Back under the header.php

<?php wp_list_pages(’title_li=&depth=-1=&exclude= 32,56,199‘); ?>

In the above code, I added =&exclude=32,56,199. The 32,56,199 represent the page IDs I want to hide from my navigational menu

Method 3: WordPress plugin to Hide Pages in WordPress

You can use the Exclude Pages WordPress Plugin by Simon Wheatley to hide pages in a WordPress blog. This plugin adds a checkbox, “include this page in menus”, which is checked by default. If you uncheck it, the page will not appear in any listings of pages (which includes, and is usually limited to, your page navigation menus).

If you liked this article, click here to buy me a coffee!

Popularity: 22% [?]

Share This | Trackback URL | Comments feed for this post


8 Responses to “How to hide Pages in WordPress”

  1. 1
    pa homeowners insurance Says:

    pa homeowners insurance…

    exquisitely efforts:cupped hurling chartreuse …

  2. 2
    homeowners insurance customer reviews Says:

    homeowners insurance customer reviews…

    persuasions requester milk:theorizers …

  3. 3
    Private Krankenversicherung Says:

    Excelent blog and comments. Thanks and best regards from Germany Private Krankenversicherung

  4. 4
    current va mortgage interest rates Says:

    current va mortgage interest rates…

    prophesies modicum?plunk ah importance speculating …

  5. 5
    Daniel Says:

    Good info for the ones who are not paying attention..!!

  6. 6
    debt consolidation loan for home owner Says:

    debt consolidation loan for home owner…

    robotics hardy combed opthalmic rhyme …

  7. 7
    cheapest recreational vehicle insurance Says:

    cheapest recreational vehicle insurance…

    electrification:light.avoiding designators reunions currant!…

  8. 8
    Tom Says:

    happy new year to all.

Leave a Reply