• Hi,

    I use get_pages() in a theme to get all the pages and sub pages to load at once.
    I sort the pages by menu_order. This was working fine.
    page (1)
    subpage (0)
    page (2)
    subpage (0)
    etc.

    Now, since the update to 3.7 all the subpages are clustered (menu_order is zero) so the whole sort order is mixed up.
    subpage (0)
    subpage (0)
    page (1)
    page (2)
    etc.

    Does anybody knows about this problem or know what to do about it?

    Thanks in advance,
    Niels

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same problem, it broke a few of my clients’ sites. I backed up a week ago when I upgraded the sites to 3.7, but I didn’t notice this problem until now, so restoring would cause us to lose a lot of data.

    This is a pretty serious bug! Has anyone found a workaround?

    This is the code that used to work, but is now NOT returning the files in hierarchical order:

    $args = array(
    ‘sort_order’ => ‘ASC’,
    ‘sort_column’ => ‘menu_order’,
    ‘hierarchical’ => 1
    );

    $pages = get_pages($args);

    Basically, I get the same results whether I pass the hierarchical parameter or not.

    Thread Starter tackenco

    (@tackenco)

    Here’s mine (almost the same)

    $args = array(
    	'sort_order' => 'ASC',
    	'sort_column' => 'menu_order',
    	'hierarchical' => 1,
    	'post_type' => 'page',
    	'post_status' => 'publish'
    );
    
    $the_pages = get_pages($args);

    Glad I’m not the only-one but now we need a fix 😉

    Everything has been working for years but since the last update the trouble starts. This is very common functionality I think, strange that there is nothing to be found on this.

    Thread Starter tackenco

    (@tackenco)

    Hee jeromeramone,
    Just did a upgrade to 3.7.1 and now its working again!
    Regards, Niels

    Me too – thanks for taking care of that so fast, WordPress!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sort Order broken after update to 3.7’ is closed to new replies.