Skip Navigation

[Resolved] I need to show the selected taxonomy name as h1 according to the selected filter

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.

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)

Author
Posts
#1879141

I need to show the selected taxonomy name as h1 according to the selected filter that is chosen.
I tried many things but cannot display it.

As you can see here: hidden link

I need a heading h1 with "Grasmaaiers".

I doesn't display it outside the loop. When I put it inside the loop it set it on all the items... I just need it above the page (and changeble if another filter term is selected)

#1879665

Hello, unfortunately Toolset does not provide a simple way to display the selected filter terms exactly like you have described. In the loop of results, you can display the terms associated with each post, as you mentioned. But there is no simple way to display the terms selected in the custom search filters. That would require custom programming, since you need a way to get a term name based on its slug in a URL parameter. There are no built-in shortcodes or blocks that offer this type of display. Another User shared their own fantastic custom shortcode solution for a similar problem here: https://toolset.com/forums/topic/how-can-i-display-the-name-of-a-taxonomy-specified-in-the-url-by-its-slug/#post-393027

You might be able to customize that solution to fit your requirements, but since this isn't related to any Toolset APIs it is custom code that falls outside the scope of support offered here, per our support policy: https://toolset.com/toolset-support-policy/

#1879697

Thanks Christian, I altered the code and it works!