Passer la navigation

[Résolu] Display all taxonomy names that belongs to post, on archive page

This support ticket is created Il y a 3 years, 3 months. 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 13:00 – 18:00 13:00 – 18:00 -

Fuseau horaire du supporter : America/Sao_Paulo (GMT-03:00)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 3 years, 3 months.

Assisté par: Mateus Getulio.

Auteur
Publications
#2567801

Tell us what you are trying to do?
I'm trying to display all taxonomy names/titles on an archive page, on the specific post thumbnail. So basically I need to see from the archive page, what taxonomies that specific post belongs to and not the current term. It needs to be top hierarchical. So I don't need the terms to display but the taxonomy.

I've used the following shortcode but this only shows current term names:
[wpv-taxonomy-archive info="taxonomy"]

What is the link to your site?
lien caché

#2568071

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no native way to display the different taxonomy names assigned to post instead of taxonomy terms. You can display taxonomy terms.

To get all the taxonomy assigned to current post you should try to use the following function: get_object_taxonomies
=> https://developer.wordpress.org/reference/functions/get_object_taxonomies/
Where:
I suggest you should create a custom shortcode and use the above function to return the number of taxonomies assigned to current post.

More info:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/