Support » Fixing WordPress » Remove grandchild – or page not to be displayed in menu

  • Resolved shanehughes


    Hi all,

    i just want to provide a text link to a page and don’t want the link to the page to appear in the header menu.

    My parent pages are displayed in the header menu and children drop down below but if you hover over a child with a grandchild, the grandchild appears blocking out any children below.

    are there any easy ways of disabling grandchildren from the header menu or even just creating a page without any place in the header menu?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Depending on how the list of pages is being displayed, it should be possible to exclude the page.

    Can you show us the function in your header.php file which lists the pages?

    If you are not sure which it is, you can upload the entire header.php file on a code hosting site like (yes, that is my site, and yes, that is a shamless plug! 😉

    Hi Dagon, i’ve added the full header.php file to your site for good measure at

    i think the relevant code is

    <ul id="page-list">
    			<li><a href="<?php bloginfo('rss2_url'); ?>"><?php _e('Subscribe', 'pressplay'); ?> &nbsp;<img src="<?php bloginfo('template_directory'); ?>/images/rss-icon.png" alt="RSS" /></a></li>
    <?php wp_list_pages('title_li='); ?>
    		</ul><!-- #page-list -->

    Just for clarity, my website is here
    when you hover over the “about” link in the header menu, you can see 2 child pages “environmental policy” and “quality management”, when you scroll down the grand child of “environmental policy” covers “quality management”


    No problem then. Just replace this:

    <?php wp_list_pages('title_li='); ?>

    With this:

    <?php wp_list_pages('title_li=&exclude=1,2,3'); ?>

    Where 1 2 and 3 are ID numbers of the pages you want excluded. You can exclude as many pages as you like.

    Dagon, many thanks, you’re a super star. I know it’s only basic stuff but for someone with no code experience it’s quite rewarding to have freedom to build, change and solve problems on my site.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove grandchild – or page not to be displayed in menu’ is closed to new replies.