Site logo

[Resolved] Ordering hierarchial taxonomy terms

Home Forums Support [Resolved] Ordering hierarchial taxonomy terms

Home Forums Support Ordering hierarchial taxonomy terms

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2450700
    gpstart

    I created a taxonomy called Location that I classified as hierarchial and assigned to my Brand CPT.

    Then, I created a location of Los Angeles. It’s parent is California, and it’s parent is USA.

    When I inserted this term into my post, it displayed it in alphabetical order: California, Los Angeles, USA.

    Is there a way to get it to display according to it’s hierarchy? So that it displays as Los Angeles, California, USA.

    I did set the hierarchy that way. That is from parent to child: USA > California > Los Angeles

    Thanks.

    #2450789
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the page in question?

    You can use the private information field:
    https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Let me know 🙂

    #2451002
    gpstart

    I can provide access.

    But, I’ve made this CPT for members only, so I’d have to create a login.

    I’ve taken 3 screenshots that maybe will help you. If not, just let me know and I’ll create a login for you and send you a link.

    This first image shows that I created an hierachial structure USA > California > Los Angeles (parent to child)
    https://drops.cyberfilebox.com/4gu4xl0o

    Second image shows that I inserted the Location taxonomy in the post.
    https://drops.cyberfilebox.com/nOu1mvzx

    Third image shows the output:
    https://drops.cyberfilebox.com/Jruy7xjQ

    #2451015
    Fernando
    Customer Support

    Hello there,

    You’ll need custom code to output and order your custom taxonomy term hierarchically.

    For instance, see this article: https://cambodesign.com/wordpress-how-to-get-taxonomy-hierarchy-on-a-single-post/

    Moreover, this article only shows how to retrieve custom taxonomy terms hierarchically if it’s just – parent & child relationship.

    An alternative would be to create custom terms, eg. Location_state, location_city…

    Through this, you’ll be able to retrieve and order them one by one.

    It may be good to ask our Facebook group for suggestions as well: https://www.facebook.com/groups/1113359788719597

    #2452398
    gpstart

    Thanks for the reference to the article. I need to read that again.

    Could I request that this be added as a feature update in a newer version? I can’t possibly be the only person that would want this.

    #2452403
    Fernando
    Customer Support

    You’re welcome!

    You may raise a feature request here: https://community.generateblocks.com/c/feature-requests/6

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