Skip Navigation

[Closed] Extract taxonomy values

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 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 3 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 2 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2779055

Hello
I have Toolset installed and working on one site, shantisadan.org
The site was set up by a developer who is no longer available, and I am catching up on how to maintain it.
I have a question which is probably very simple, perhaps you can save me time by providing the answer or a link to where I can find it.

Using Toolset, a custom Post Type was created, called 'Journal Content'.
It has various 'Taxonomies', including 'Issue', 'Article Titles', 'Years' (of issue), 'Season' (of issue)

I would like to display on a webpage, the value of eg 'Years' and 'Seasons' for a particular issue. So it would display for example:
This is issue number [Issue value], published in [Season value] [Year value]
Can you advise or point me to a reference where I can see the shortcode or whatever I need to do that?
Thank you!

#2779093

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Paul,

Thank you for reaching out, and I’m happy to help with your question.

To display the values of the 'Years' and 'Seasons' taxonomies, along with the 'Issue' for a particular custom post type ('Journal Content') on your page, you can use the wpv-post-taxonomy shortcode.

Here is an example of how you can set it up where you're looping your posts of the CPT Journal Content:

<p>This is issue number [wpv-post-taxonomy type="issue"], published in [wpv-post-taxonomy type="season"] [wpv-post-taxonomy type="years"]</p>

Replace "issue", "season", and "years" with the actual taxonomy slugs used on your site.

This shortcode will dynamically pull and display the values of those taxonomies for the 'Journal Content' post type.

For more details on how to use the shortcode please check the documentation here: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-taxonomy

Feel free to reach out if you have any further questions or need additional assistance!

Best regards,
Mateus

#2779395

Hello Mateus
I tried dropping the code into a page, and it just appeared as text.
The site was build with Beaver Builder, is there anything in particular I need to have installed and activated?
If I go into one of the CPT, and use a text editor to add the shortcodes to the post, should that work?
Thanks!
Paul

#2779535

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Paul,

You need to be in a view looping through that CPT or in a template in order for it to work.

Please check this material to see if it helps giving you an idea:

https://toolset.com/course-chapter/displaying-content-types/

Thank you,

The topic ‘[Closed] Extract taxonomy values’ is closed to new replies.