Muffin menu widget (order)

Hi, is it possible to alter the order of the pages from alphabetical?

Comments

  • Hi,

    to do that, please go to functions/widget-menu.php file and replace below code:
    $aPages_attr = array(
                'title_li'         => '',   
                'depth'         => 1,
                'child_of'        => $parentID,
                'link_before'     => '',
                'echo'            => 0,
            );
    with:
    $aPages_attr = array(
                'title_li'         => '',   
                'depth'         => 1,
                'child_of'        => $parentID,
                'link_before'     => '',
                'echo'            => 0,
                'sort_column'  => 'post_title, menu_order',
            );
    As we see, we in second part of code we added sort_column value. More info about this function where we changed this value you can read on http://codex.wordpress.org/Function_Reference/wp_list_pages
Sign In or Register to comment.