- This topic has 5 replies, 3 voices, and was last updated 3 years, 4 months ago by
Fernando.
-
AuthorPosts
-
December 5, 2022 at 11:46 am #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.
December 5, 2022 at 1:21 pm #2450789Leo
StaffCustomer SupportHi 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-informationLet me know 🙂
December 5, 2022 at 6:46 pm #2451002gpstart
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/4gu4xl0oSecond image shows that I inserted the Location taxonomy in the post.
https://drops.cyberfilebox.com/nOu1mvzxThird image shows the output:
https://drops.cyberfilebox.com/Jruy7xjQDecember 5, 2022 at 7:07 pm #2451015Fernando 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
December 6, 2022 at 10:02 pm #2452398gpstart
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.
December 6, 2022 at 10:07 pm #2452403Fernando Customer Support
You’re welcome!
You may raise a feature request here: https://community.generateblocks.com/c/feature-requests/6
-
AuthorPosts
- You must be logged in to reply to this topic.