• Resolved fusillijerry89

    (@fusillijerry89)


    Hello. I want to only include 5 pages on my navigation bar (or w.e. it’s called) at the top of my site livingmadegreen.com. I’ve read that you use something like this:
    <?php wp_list_pages(‘include=1,2,3,4,5&title_li=’); ?>. If I remove ‘title_li=’ then the pages won’t be displayed the way I want them to (the way they are now, with tabs for 5 pages) but right now it’s only displaying the first page (id=1), but if I switch 1 and 2 so that it says ‘include=2,1,3,4,5’ it will still display page 1. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    Include does not set the display order, only which pages are displayed.

    Display order can be set with the “order” setting on either the page edit page or in the quick edit settings. I suggest numbering your pages 5, 10, 15, 20 in the order you want them displayed.

    You will need to add this to wp_list_pages
    wp_list_pages(‘include=1,2,3,4,5&title_li=&sort_column=menu_order’)

    Also, here is a plugin
    https://www.technokinetics.com/plugins/page-lists-plus/
    If you choose to install it, you won’t need to set “include=” because you can exclude a page from being in the nav on the edit page for that page with a plugin setting. If you find that easier, install the plugin. If you are ok with the include statement, go that route.

    Thread Starter fusillijerry89

    (@fusillijerry89)

    thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excluding Pages Quick Problem’ is closed to new replies.