• Resolved exion98

    (@exion98)


    Hello everyone, i wondered how can I create somethings like a main tag for each post, and sub tag that are different for every post but are under the main tag. Let me give you an example to understand what i mean:
    I have a site wich talks and maybe review cars. Now every car have an year, a color, a manufacter, ecc…
    Now let’s assume that i talk in my site also about manufacter. I am in the Audi post, and add(in this case using elementor) a portfolio, where i put every post with the main category “audi car”. What I want, is to sort every post by the year of every car, not by the date when i wrote the post.
    How can i do it? It is possible create an “year” tag that can i put in every post about car and select a different sub tag for each posts, like car A1 with year tag and sub tag 2010, then audi a3 with year tag and 2013 sub tag?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 14808221

    (@anonymized-14808221)

    Typically here you are looking at different taxonomies.

    So, one taxonomy (probably a hierarchical one like categories) would me “Models”.
    Note that the actual hierarchies below are just for example, depending on your needs they might need to change:

    – SUVs
    — Audi model x
    — VW model x
    – Vans
    — Fiat model x
    — Cherokee model x
    – ETC
    — ETC

    And, you’d be using for example a flat taxonomy called “Years” to add the models year:
    – 1991
    – 1992
    – 1993
    – ETC

    This way, you can combine model and year without “interference”

    How this will work with Elementor’s Card lists and slides etc I am not sure but if I recall right they have query filters where you can select tags and taxonomy terms to filter the output of the loops.

    Thread Starter exion98

    (@exion98)

    That’s exactly what i mean, thanks. I have create multiple taxonomies like year, model, color and now for each car post i can set specific terms such 1990, A1 and red in separate way.
    But my main probelm remain. I want to use such a deeper taxonomy structure, becouse i want order my post for example by year and not by date, but the “year” term in the query setting can’t be selected, i can select just 1 or more specific year.

    Anonymous User 14808221

    (@anonymized-14808221)

    Hummm, OK – I think I understand what the issue is here.

    It is not possible to order posts by taxonomy, because from a certain type of standpoint, that doesn’t actually make much sense:
    Taxonomies are ways to group things together.

    So you really would be telling any sort of WP Query based code “order by these groups” instead of “Order these items by the unique asc or desc value XY”

    Thus, it may be better to create a Custom Field instead, where in the Custom Field, you would manually enter the year, and then order the query by that Custom Field.

    But, I fear that is not possible in Elementor. For this you need more advanced Plugins like Toolset Views (Paid) or you might give plugins like https://www.ads-software.com/plugins/search-filter/ and https://www.ads-software.com/plugins/custom-search-plugin/ a try, however I am not 100% certain they allow custom field ordering.

    What you can also think about is instead of creating a ordering, you could create a custom search for the posts, where then you can use again Terms, since you can “query” posts by terms.
    Again here above mentioned plugins could help.

    Another option is (but this will not allow for ordering or searching) is simply use the taxonomy terms archives (so you will have an archive for 1996, 1997, etc)

    Let me know if I misunderstood the task, or if this information helps your quest further…

    Thread Starter exion98

    (@exion98)

    You actually get the point, thanks for your help. I will try those plugins or maybe i’m gonna make custom field as you said, i think is the better way. thank you again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create a tag hierarchy for better sort, is it possible?’ is closed to new replies.