WordPress.org

Ready to get started?Download WordPress

Forums

Navigaton Bar (6 posts)

  1. greatsales
    Member
    Posted 7 years ago #

    Just wondering, is there a way when creating new pages to have them NOT show in the nav bar? I remember seeing this somewhere, but couldn't find it in docs or forums. Thanks in advance.

  2. MarkMichon
    Member
    Posted 7 years ago #

    if you are using wp_list_pages() to make your list, change it to
    <?php wp_list_pages('exclude=#' ); ?>

    Change # to the page number you wish to exclude. you can exclude as many as you want by separating them with commas.

  3. greatsales
    Member
    Posted 7 years ago #

    hmmmm....looked in "includes" and elsewhere and did not find wp_list_pages()...

  4. greatsales
    Member
    Posted 7 years ago #

    ok...here's the code by default in the header...

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

    ...are you suggesting that this ('exclude=#') be placed after ('title_li=') or that it should maybe look like this...

    <?php wp_list_pages('title_li=''exclude=#'); ?>...

  5. greatsales
    Member
    Posted 7 years ago #

    well, I tried this...

    <?php wp_list_pages('title_li=','exclude=125'); ?>

    ...no errors, but page still shows on nav bar...

    suggestions?

  6. MarkMichon
    Member
    Posted 7 years ago #

    <?php wp_list_pages('title_li=&exclude=125'); ?>

    try that.

Topic Closed

This topic has been closed to new replies.

About this Topic