Update to 1.5.3 Menu Order

  • Anonymous


    Syahir, Thanks for the update!!

    One small issue… my main menu is in an order that is different from the order I specify in my “Pages”. Each page is numbered in the order I want. However, it displays alphabetically when viewing live.

    If I enable the “Header Menu” in the menu options tab, the order is correct… probably because it is using my custom menu. (But then I don’t get my page menu subtitles).

    So, the problem is with the default pages menu across the top of my page. They are displaying in alphabetical order rather than by page number.

    The menu order use to display “Home, Index, Life, Malea, etc…”. You can see how it is different now.

    Any suggestions?




    I’ve also noticed the child pages sub-menus, in the main menu, also display in alphabetical order rather than by page number.



    Got it. The problem lies within “functions.php”.

    Here was the original code from the problem area:

    $args = array( 'echo' => 1,
    'sort_column' => 'menu_order page_title',
    'depth' => 5,
    'title_li' => '',
    'walker' => new Walker_PageDescription() );
    wp_list_pages(apply_filters( 'graphene_default_menu_args', $args) );

    And here is what I changed it to:

    $args = array( 'echo' => 1,
    'sort_column' => 'menu_order',
    'depth' => 5,
    'title_li' => '',
    'walker' => new Walker_PageDescription() );
    wp_list_pages(apply_filters( 'graphene_default_menu_args', $args) );

    Notice the “sort_column” attribute. This needs to be changed from 'sort_column' => 'menu_order page_title', to 'sort_column' => 'menu_order',.



    Syahir Hakim


    Just to explain things a little better:

    'sort_column' => 'menu_order page_title',

    means to sort the pages according to menu order first, then alphabetically. The problem is that the syntax is not correct. It should be:

    'sort_column' => 'menu_order, page_title',

    Notice the comma after menu_order.



    Gotcha. Dangit… and I thought I had one figured out on my own!

    Thanks, my friend!



    I just updated also and now I am having this same issue. I am new to word press and don’t understand either post regarding how to fix this. Can you please help!



    Sure. Go to admin panel -> Appearance -> Editor.

    Then, in the top right, make sure “Graphene” is selected.

    Over on the right is a list of files. Click on “Theme Functions (functions.php)”.

    If you are using Mozilla Firefox, press ctrl-F and a search box will open in the bottom of your browser.

    Search for “sort_column” (without the quotes).

    Now, just add the comma in the code as pictured above. Your final result should look like this:

    'sort_column' => 'menu_order, page_title',

    Please let me know if you run into trouble along the way.



    Thank you Josh. This worked! I have been working on my blog for over a month and it seems like everything that could go wrong has. Thank you again for your help.



    My pleasure.

    Is there anything else in particular you are struggling with? Perhaps I can help.



    Dear all, Any advice please NB I don’t know anything about codes!? I think Graphene will provide a simple, elegant template that will work for our website, so thanks! However, I also think I have the problem that the bar with all my pages on it is alphabetical and not in the original page order. I cannot show it to you because the site is still in a draft form. I have tried to follow your instructions above, but after I get to the bit about clicking on Theme Functions (functions.php) I get lost. When I search on Mozilla for sort_column it generates the following with no mention of pages, only posts:

    ‘sort_column’ => ‘menu_order post_title’,

    ‘depth’ => 5,

    ‘title_li’ => ”,

    ‘walker’ => new Walker_PageDescription() );

    wp_list_pages(apply_filters( ‘graphene_default_menu_args’, $args) );



    do_action( ‘graphene_default_menu’ );



    class Walker_PageDescription extends Walker_Page {


    * Code exact copied from: wp-includespost-template.pgp >> Walker_Page::start_el()

    * @since 2.1.0


    function start_el(&$output, $page, $depth, $args, $current_page) {

    if ( $depth )

    $indent = str_repeat(“t”, $depth);


    $indent = ”;

    extract( $args, EXTR_SKIP);

    $css_class = array( ‘page_item’, ‘page-item-‘.$page->ID)

Viewing 10 posts - 1 through 10 (of 32 total)

  • You must be logged in to reply to this topic.