Skip Navigation

[Resolved] Looking for the shortcode of a custom taxonomy

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user asks on how to display a post's taxonomy terms using shortcodes.

Solution:
You can use the wpv-post-taxonomy shortcode like this:

[wpv-post-taxonomy type="platform" separator=", " format="link" show="name" order="asc"]

This will produce links to the terms' archives, separated by a comma(,).

You can also iterate through the array of terms with the wpv-post-taxonomy-iterator and produce the markup that you need with the wpv-taxonomy-* shortcodes:

<ul>
    [wpv-post-taxonomy-iterator taxonomy="platform"]
        <li><a href="[wpv-taxonomy-link]">[wpv-taxonomy-title]</a></li>
    [/wpv-post-taxonomy-iterator]
</ul>

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153472

This support ticket is created 3 years, 2 months 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by perryv-2 3 years, 2 months ago.

Assisted by: Jamal.

Author
Posts
#2226903
Edit_Taxonomy_‹_llayer_—_WordPress.jpg

Tell us what you are trying to do?
I've created a custom taxonomy called Platforms (slug = platform). In the linked custom post type I'm looking for the shortcode so I can get the value (the checked categorie).

Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

#2226963

Hello and thank you for contacting the Toolset support.

I assume that you are looking for the shortcodes to display the taxonomy terms assigned to a post, right? For example in the post's single page, or inside a view or an archive template, right? You can use the wpv-post-taxonomy shortcode like this:

[wpv-post-taxonomy type="platform" separator=", " format="link" show="name" order="asc"]

This will produce links to the terms' archives, separated by a comma(,).

You can also iterate through the array of terms with the wpv-post-taxonomy-iterator and produce the markup that you need with the wpv-taxonomy-* shortcodes:

<ul>
    [wpv-post-taxonomy-iterator taxonomy="platform"]
        <li><a href="[wpv-taxonomy-link]">[wpv-taxonomy-title]</a></li>
    [/wpv-post-taxonomy-iterator]
</ul>

All these shortcodes are documented on the same article https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153472

If I did not understand your questions correctly, please elaborate more on it, maybe give an example, and let me know what you want to display as a result.

#2227005

My issue is resolved now. Thank you!