Support » Fixing WordPress » Page order

  • I have specified a page order but the tabs are not showing up in the order specified. After Home, they’re showing up in alphabetical order.

    They show up in alphabetical order in the categories listing in Sidebar 1 (which I have named “Index,” but that’s because I set it up that way. That should not affect the tab order, should it?

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

    Most likely you need to change a parameter on the line of code that displays the items on your Nav line.

    If its a horizontal Nav bar, that code is most likely in header.php in your theme folder.

    The line that needs changing contains the phrase wp_list_pages() There is usually other text in between the parentheses.

    If it looks like this wp_list_pages() then change it to this

    If there already are other items in between the parentheses then add this to the beginning of the list, starting here: ‘wp_list_pages(‘sort_column=menu_order&{leave the rest of what is already on the line here}’

    (If there is already a “sort_column=” on that line, then change what is on the right side of the equal sign from whatever it is to menu_order)

    In other words, insert sort_column=menu_order between the first apostrophe (it could be a double quote instead of an apostrophe) and the text that is already after the apostrophe. The ampersand is a separating character that goes between the settings the program is telling wp_list_pages to use.

    Save that, and you should be OK. Most themes do use wp_list_pages, but not all. If yours does not, post that back here and someone will help you with what you have.

    I found the code in the menu.php file. Here’s how it reads with the change you suggested
    (see the 7th line of code):

    <div class=”menu”>

    <?php if(function_exists(‘wp_page_menu’)) : ?>
    <?php wp_page_menu (‘show_home=1&depth=1&title_li=’); ?>
    <?php else : ?>

    • “>Home
    • <?php wp_list_pages(‘sort_column=menu_order&depth=1&title_li=’); ?>

    <?php endif; ?>

    So far, after 15 minutes, the change has still not shown up when I view my stie. I’m willing to wait a while longer before hollering for help again, as earlier today it took a very long time for a font change to show up after I had updated the file.



    It looks like what is going on is the template is executing the wp_page_menu() function instead of wp_list_pages(). Make the exact change you made to wo_list_pages to wp_page_menu, exactly as you did on wp_list_pages. That should do it.

    It doesn’t take 15 minutes, or 15 seconds, for changes to show up. They are instantaneous. What can happen is your browser might be displaying the older version from the browser cache. Pressing <CTRL> + R a time or 3 forces a page reload from the webserver which will then display your changes.

    EXCELLENT! Worked like a charm. And thanks for the feedback on the delay I’ve been experiencing seeing my changes when I view my website.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page order’ is closed to new replies.