Skip Navigation

[Resolved] Get name of top level category

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 8 years ago.

Assisted by: Shane.

Author
Posts
#385603

Hello,

I try to get the name of a top level categoryname (eg. country) in a view.

for example, I have categories:

France
- Lion
- Paris

"[wpv-post-taxonomy format='name']" show me only "Lion" and I want to get the top level category "France"

it is possible? please help

Thanks!

#385915

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cojocaru,

Thank you for contacting our support forum.

Taking a look at this our shortcodes are not able to deliver only the top level taxonomy terms since our shortcode is using the get_the_terms() function.

To do this you will need to write a custom shortcode to only deliver the taxonomy parent.

This custom shortcode will need to use the get_term() function.
http://wordpress.stackexchange.com/questions/157818/get-terms-only-top-level

What you can do is to contact one of our certified partners for assistance with this.
https://toolset.com/consultant/

Please let me know if this helps.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.