WordPress.org

Ready to get started?Download WordPress

Forums

Restaurateur
Change the order of the menu items (3 posts)

  1. shyne23
    Member
    Posted 6 months ago #

    is it possible to change the order of the categories "cat id" instead of alphabetical.?

  2. will7914
    Member
    Posted 6 months ago #

    Hello. I found how to do that.

    1) In back office, when you create your menu categories, in the "id" part, set a number, for example : "0-dessert", "1-starters", "2-drinks"

    2) In menu-items-template.php and menu-items-template-full.php, line 19, replace

    $terms = get_terms('menu_item_category');

    by

    $terms = get_terms('menu_item_category', array (
                            'orderby' => 'slug'
                        ));
  3. shyne23
    Member
    Posted 6 months ago #

    Thanks a lot!

    I will test it today.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.