WordPress.org

Ready to get started?Download WordPress

Forums

Page Order Bug? (3 posts)

  1. stricha
    Member
    Posted 6 years ago #

    I have four pages set up and call using

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

    I've numbered each page, and in the Manage Pages view the pages show in the desired order. However, on the site the page numbered last shows up as the second. I deleted and created the page again and the same thing happened. I'm not sure how to troubleshoot this. Has anyone encountered a similar problem?

  2. Jeremy Clarke
    Member
    Posted 6 years ago #

    the wp_list_pages() function has a lot of different parameters, one of which determines how it's organized (the default is alphabetical). I believe the one you are looking for is

    'sort_column=menu_order'

    meaning that your theme should have:

    <?php wp_list_pages('title_li=&sort_column=menu_order'); ?>

    When in doubt about a specific tag, check the codex/wiki, most tags have a pretty good article that will solve your problems:

    http://codex.wordpress.org/wp_list_pages

    p.s. I'm with you about it being strange though. The fact that it lets you type in the page numbers but doesn't tell you that by default the numbers do nothing is pretty frustrating.

  3. stricha
    Member
    Posted 6 years ago #

    Thanks so much, Jeremy. That did it!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags