WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Unwanted pages on main nav (8 posts)

  1. mmfuentes
    Member
    Posted 3 years ago #

    I created my main nav using wp_list_pages ('title_li=') and I'm fine with that.
    Everything is where is supposed to be, and looks the way is supposed to.

    My problem is that when I create a new page it shows in my main nav. and I don't want that. If I set it to private goes goes away, but when I target the page it shows as private and I don't what the "Private" label to show to the user. I tried exclude_ but had no luck.

    Any way to display in my main nav just the pages I want??

    Any help would be greatly appreciated!

    Lost in navigation.

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    http://codex.wordpress.org/Function_Reference/wp_list_pages

    there are the parameters
    'include'
    or
    'exclude'

    for instance:
    <?php wp_list_pages(title_li=&exclude=3,7,255); ?>

  3. mmfuentes
    Member
    Posted 3 years ago #

    Thanks Alchymyth!
    I tried that already and the page that I don't want still showing on my nav.
    right now page order 7 is the one that I don't want it to show. This is what I got, but still showing.

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

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Site url?

  5. mmfuentes
    Member
    Posted 3 years ago #

    Esmi,

    I'm working local on my mac.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

  7. alchymyth
    Forum Moderator
    Posted 3 years ago #

    right now page order 7 is the one that I don't want it to show

    the number to enter to the exclude is the page id - not the page order.

  8. mmfuentes
    Member
    Posted 3 years ago #

    Thank you alchymyth.

    That solved my problem.

Topic Closed

This topic has been closed to new replies.

About this Topic