• I have a template with a navbar built in. When I create a page it adds that page to the navbar as either a parent or a sub-parent.

    I have several pages that I need to allow access to for visitors so I can’t make them private. If I make them public they show up on the navbar. If I leave the title blank it just places a blank button the navbar.

    Anyone have a way of hiding a page from the navbar without making it private?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • In the theme I’m using I had to add an “exclude” statement to the header.php

    Here is what it looks like:

    <li><a href="<?php echo get_option('home'); ?>/" class="on">Home</a></li>
      <?php wp_list_pages('exclude=2,14,76,106,253,290,372&title_li='); ?>

    I want to do the same thing. In my “header.php”, here’s what the code looks like:

    <div id=”navbarleft”>
    <ul id=”nav”>

    • ” class=”style1″>Home
    • <?php wp_list_pages(‘title_li=&depth=4&sort_column=menu_order’); ?>

      How do I add the exclude in order to make it work?

      Thanks.

    There’s also a Exclude Pages from menus and navigation plugin that I’ve used in the past and it works well. No code or template editing necessary.

    markhawkins

    (@markhawkins)

    Brill was looking for exactly that – Exclude Pages, fantastic!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding pages from nav bar’ is closed to new replies.