Skip Navigation

[Resolved] Display taxonomy name (not slug) which has been filtered

This support ticket is created 4 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1558401

Tell us what you are trying to do?
I am trying to show the results which have been searched for.
Visitors can search via text search, or by clicking on a taxonomy 'coronahelpfor'
However, [wpv-search-term param='wpv-coronahelpfor'] shows the slug - I would prefer to show the Name.
For example, to show "Things to do" rather than "things-to-do"
Do you know how I can do this?

This is the code as it is currently -
<div class= "resultshere">Showing results for [wpv-search-term param='wpv_post_search'][wpv-search-term param='wpv-coronahelpfor']

#1559437

Hello,

There isn't such kind of built-in feature within shortcode [wpv-search-term], see our document:
hidden link

You might consider custom codes, for example:
1) Create a custom shortcode with custom PHP function:
https://developer.wordpress.org/reference/functions/add_shortcode/

2) In this PHP function:
Get the URL parameter "wpv-coronahelpfor" value:
hidden link
Use above value to get the term's information, and output the term's name:
https://developer.wordpress.org/reference/functions/get_term_by/

For your reference.

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