WordPress.org

Ready to get started?Download WordPress

Forums

Remove Page From Top Menu? (5 posts)

  1. dnnsigns
    Member
    Posted 6 years ago #

    I know I have to enter this:

    <ul>
    <?php
    wp_list_pages('exclude=17,38' ); ?>
    </ul>

    But what file do I insert it into and where abouts in that file?

  2. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Usually the nav menu is in the header.php file.

  3. dnnsigns
    Member
    Posted 6 years ago #

    How do I put the code in? I added it like below but it does not work:

    <ul>
    <li><a>">Home</a></li>
    <?php wp_list_pages('title_li=&depth=1'); ?>
    <?php wp_list_pages('exclude=8,8' ); ?>
    </ul>

    Its Page 8 im trying to hide.

  4. Sridhar Katakam
    Member
    Posted 6 years ago #

    You can also exclude pages from appearing in most themes' Pages list using http://wordpress.org/extend/plugins/exclude-pages/#post-2370 plugin.

  5. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Don't add two of them just edit the existing one.

    <ul>
    <li><a>">Home</a></li>
    <?php wp_list_pages('title_li=&depth=1&exclude=8'); ?>
    </ul>

    Resources
    http://codex.wordpress.org/Template_Tags/wp_list_pages
    http://codex.wordpress.org/Stepping_Into_Template_Tags
    http://codex.wordpress.org/Stepping_Into_Templates

Topic Closed

This topic has been closed to new replies.

About this Topic