WordPress.org

Forums

Menu order doesn't work (16 posts)

  1. nobby
    Member
    Posted 5 years ago #

    Hi all

    My menu order is dictated by alphabetical order, changing the order number has no effect, nor does installing a menu order plugin, how the heck do i fix this? not come across this before in countless WP installations.

    thanks

    Nobby

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    What tags are you using in your menu?

  3. nobby
    Member
    Posted 5 years ago #

    Sorry, i'm not sure i understand what you mean, i have assigned the order to each page numbers 1-6, which normally works just fine, but in this case they are still showing alphabetically.

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    What tags are being used in your theme's template files to generate your page menu?

  5. nobby
    Member
    Posted 5 years ago #

    Sorry esmi, i have no idea, where would i look?

  6. nobby
    Member
    Posted 5 years ago #

    Would this be it?

    <?php wp_page_menu(); //page menu?>

  7. esmi
    Forum Moderator
    Posted 5 years ago #

    Yes!

    If you want your page listing to reflect your Admin page order, try replacing wp_page_menu() with wp_list_pages('title_li=&sort_column=menu_order'). If you want your pages listed alphabetically by title, use wp_list_pages('title_li=&sort_column=post_title').

  8. nobby
    Member
    Posted 5 years ago #

    Hey esmi, thanks, that code did put the menu in order, unfortunately it trashed the formating of the menu too, but its clearly close. Any ideas how i can fine tune it?

  9. esmi
    Forum Moderator
    Posted 5 years ago #

    Try
    <div class="menu">wp_list_pages('title_li=&sort_column=post_title')</div>

  10. nobby
    Member
    Posted 5 years ago #

    no, that doesnt work at all, sorry.

  11. nobby
    Member
    Posted 5 years ago #

    All fixed, here is the code:

    <div id="container" class="clearfix">
    <div class='menu'>
    <ul>
    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    </ul>
    </div>
    </div>
  12. Kadr
    Member
    Posted 5 years ago #

    were exactly did you put that code? Which file and which lines needs to be modified?

    thnx!

  13. henkholland
    Member
    Posted 5 years ago #

    Hi Kadr, depends on your theme but probably in index.php .

  14. Kadr
    Member
    Posted 5 years ago #

    Hey henk,

    I was able to fix it with a plugin: http://geekyweekly.com/mypageorder

    but thnx for the help!

  15. rwilki
    Member
    Posted 5 years ago #

    how can i order pages by id? i don't want them sorted alphabetically or by admin dates, etc... I would like this sorted according to the ID #s of my choice...

  16. esmi
    Forum Moderator
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic