Skip Navigation

[Resolved] Archive title

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

Problem: I would like to display just the taxonomy name like "My Taxonomy" instead of the full hierarchy like "Type of post: My Taxonomy"

Solution: Use the [wpv-taxonomy-archive info="name"] shortcode

Relevant Documentation: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

This support ticket is created 7 years, 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by miguelG-5 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#481047

Hello

I'm trying to get the archive name in my view with [wpv-archive-title]

I get "Type de projet : Sport" but I would like to get only "Sport" is it possible ?

hidden link

---

Also I would like to conditionally get a different image in the background of the title but I need help with my code, should I use

[wpv-conditional if="( '[wpv-archive-title]' eq '8' )"]

or

[wpv-conditional if="( '[wpv-archive-title]' eq 'Sport' )"]

I can't get it to work

Thanks in advance for your help

Miguel

#481166

Hi Miguel, it depends on how your content is organized. What is "Sport" - a Custom Post Type, a Custom Taxonomy, a Custom Field in some other post type, etc? Rather than get the archive title, you probably want the slug or title of whatever "Sport" represents. The archive title is always going to have the hierarchical text unless you want to write a custom shortcode that trims the text output using PHP.

#481312

Thank you Christian

I found another thread with the solution, the shortcode to be used is :

[wpv-taxonomy-archive info="name"]

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