Sort by category and then by name : the solution
-
Hi there,
I posted a request here, but topic is now closed and can not reply on it.
So for those who are trying to sort dishes in the menu item page, here is what you’ll have to do :
But first of all, please BACKUP YOUR FILES BEFORE MODIFYING ??
in files menu-template-*.php, go to line 59, and replace :
$wp_query->query( array( 'post_type' => 'menu_item', 'posts_per_page' => -1, //'paged' => $paged ));
By
$wp_query->query( array( 'post_type' => 'menu_item', 'posts_per_page' => -1, 'orderby' => 'title name', 'order' => 'ASC', //'paged' => $paged ));
I tried with menu-template-full.php and seems to do the trick. I still need to test in the other templates…
Check this for explanations
- The topic ‘Sort by category and then by name : the solution’ is closed to new replies.