Support » Plugin: Custom Post Type UI » order taxonomies

  • hello
    How can we sort / order the taxonomy list in frontpage ? is there any way to set a number to set up an order of taxonomy’s list ?! thx !

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Michael Beckwith


    If this is a feature provided by your active theme, or a different plugin, you’ll need to consult with them with how they handle the display and fetching of the content. This isn’t anything our plugin will be able to affect.

    The page is a php custom page, so, this is not related to active theme. The thing is how can we set up any custom order to taxonomy items ?

    Plugin Author Michael Beckwith


    it’s still going to be related to the theme, whether the file came with it originally or it got added by you or someone else on your team.

    With that said, I don’t know how you’re querying for things and what WordPress functionality you’re utilizing, so I can’t answer anything without seeing what’s in the custom page file.

    taxonomy’s list is just displayed using a basic foreach function, nothing fantastic.
    but how can I order the items as I do not see for each item any attribute to set a number and then order them ? or did I miss something ?

    for each taxonomy item, I only see name / slug / parent / description. but nothing to be used in order to set a custom order. how can we set that then ? thx !

    Plugin Author Michael Beckwith


    How are you creating the array to iterate over? something like this?

    $taxonomies = array( 'category', 'post_tag', 'custom_taxonomy_one', 'custom_taxonomy_two' );

    Or are you actually referring to TERMS in the taxonomy? Say something like

    $terms = get_terms( array(
        'taxonomy' => 'custom_taxonomy_one',
        'hide_empty' => false,
    ) );

    If you’re using get_terms, then the arguments available can be found at specifically the “orderby” section.

    CPTUI itself still doesn’t have any functionality or integration for exactly what you’re doing here, so settings aren’t present. All a matter of adjusting how you’re doing things and what options are available with the present code.

    ok, then, using a third plugin ofr custom fields, adding a custom field in order to set a number for each taxonomy item, and then, using orderby and the custom field. should work. thx.

    Plugin Author Michael Beckwith


    I imagine so, definitely one way to handle.

    May the code be ever in your favor 😀

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.