Support » Plugin: Pods - Custom Content Types and Fields » Order Taxonomies by menu_order not working

  • Resolved kdetmold

    (@basti743)


    Hello,

    I have the following shortcode:

    [pods name="recipe_category" template="MyTemplate" orderby="name"]

    That is working fine.

    However, when changing the order statement to orderby="menu_order" no entities are listed anymore. The page just remains blank.

    So my question is: how can I make ny taxonomy items sortable for the WordPress admin?

    • This topic was modified 1 year, 6 months ago by kdetmold.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @basti743

    Taxonomies don’t have a menu_order property by default. You’ll have to add a custom field for this to the taxonomies.
    After that you can refer to this field by using menu_order.meta_value.

    Cheers, Jory

    Thread Starter kdetmold

    (@basti743)

    @keraweb thank you very much for your reply.

    Your solution works, but it’s not really practical as it is very inconvenient to set all values individually.

    I use the “Custom Post Type Order” plugin, with which the taxonomies can be moved in the administration. I was surprised why sorting is possible there, but not in the front end.

    Long story short: I have now learned that taxonomies do have a sorting, which is called “term_order” instead of “menu_order”. Plugins like “Custom Post Type Order” work wonderfully with this sort order, but queries do not by default.

    To use this sorting in combination with pods, the above shortcode simply has to be changed as follows:

    [pods name="recipe_category" template="MyTemplate" orderby="term_order"]

    However, thank you for the fast support.

    • This reply was modified 1 year, 6 months ago by kdetmold.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @basti743

    I have now learned that taxonomies do have a sorting, which is called “term_order” instead of “menu_order”. Plugins like “Custom Post Type Order” work wonderfully with this sort order, but queries do not by default.

    I believe that term_order isn’t exactly the same as the order of the terms in the edit_term.php page.
    It seems this is the order you set within your post<>term relationship, not for the term in general.
    Though I must say I never really looked into this until now.

    In any case, as long as it works for you!

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Order Taxonomies by menu_order not working’ is closed to new replies.