Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #26509

    Gday Kriesi

    By default, when the page sidebar submenu items are displayed, they are ordered alphabetically.

    As an example, if I have a main menu in the header with an About Us page with hovered submenus, such as:

    About Us

    - History

    - Staff

    - Corporate

    - Management

    and then if I view the About Us page, the submenu in the page sidebar menu gets re-ordered alphabetically to:

    - Corporate

    - History

    - Management

    - Staff

    This causes disorientation (especially in very long submenus) since the main menu hovered submenus have a very specific order of priority.

    Can anyone supply a code modification to render the sidebar submenus in the same order as they appear within the main menu submenus?

    Thanks for any help you can provide me.

    cheers

    Darryl

    #130669

    1) Try to replace following line in functions-enfold.php

    $args = array('title_li'=>'', 'child_of'=>$parent, 'echo'=>0, 'sort_column'=>'menu_order, post_title');

    with

    $args = array('title_li'=>'', 'child_of'=>$parent, 'echo'=>0, 'sort_column'=>'menu_order');

    2) If this doesn’t help make sure you set a valid menu order value for all pages (“Pages Attributes” field on the page editor page). You can also try http://wordpress.org/plugins/post-types-order/

    #130670

    Thanks for your help with this Devin. Your solution works almost entirely, but one set of pages is resorting to alphabetic. I have a screencast here showing this, could you please watch (90 secs) and see if it highlights anything to you: http://screencast.com/t/ZcLHMjkg

    I really appreciate your help with this.

    cheers

    Darryl

    #130671

    Hi,

    What would happen if you changed the order of the menu items in Appearance Menu for the one that isn’t showing it correctly. Does it make any difference? What about if you switch the Restaurants (the first one that becomes last in sidebar) and move it to a different sub menu? And last what If you made just a new page calling it anything else and placing it in place of Restaurant or as the Parent? I assume you have all the pages in the sub menu as child pages of the main parent, correct? Because in that bit of code you showed at the end I saw something about order same as menu, but left of it something about child/parent. Please check that it really is the case.

    Thanks,

    Nick

    #130672

    Thanks for your support with this Nick.

    Re your first idea, when I reordered via Appearances > Menu it changes the order in the main menu hovered submenu, but not in the sidebar.

    Re your second idea, moving the submenu to a different sub menu did change the position in the main menu and hovers, but it did not move it in the sidebar, it stayed in the original place, still in the original wrong.

    Immediately therafter, I moved the submenu back to the previous menu location and then the website displayed everything as intended. Do you have any idea why it would correct from something like that?

    Thanks Nick, I hope it stays put now ;) as it doesn’t make any sense to me why it would behave like that.

    #130673

    Hmmm, having said that, the sub-sub-menus are having the same issue, and that prior little fix doesn’t seem to fix them.

    #130674

    Reordering the sub-sub menu siblings after doing the above step has worked…I hope this doesn’t happen again, doesn’t seem a very reliable menu system.

    #130675

    Thanks for your ideas Nick, got me off in the right direction, much appreciated.

    #130676

    Hi,

    There is often an inherent problem with WordPress core that I noticed where sometimes thing need to be moved around a bit before initially saving them. I like to almost shuffle my menus a few times,,, sort of to warm it up. Same goes for the widgets and sidebars, good idea to move them a bit around, somehow it works (or maybe I am just projecting lol).

    Enjoy the theme!

    Thanks,

    Nick

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘How to ReOrder Page Sidebar Submenu Items’ is closed to new replies.