Skip Navigation

[Resolved] edit taxonomy filter

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

Problem:

The issue here is that the user wanted to add a class to his taxonomy filters.

Solution:

You should be able to do this by adding the class attribute to your filter shortcode.

If that does not work then you can take a look at the link below.
https://stackoverflow.com/questions/32631319/add-class-the-option-selected

https://stackoverflow.com/questions/8619406/css-selected-pseudo-class-similar-to-checked-but-for-select-elements

This support ticket is created 6 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 – 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 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#616854

Hello, i created a filter by category and i would like to know how i can do to add a class to the current category label display

#616876

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

Thank you for contacting our support forum.

Unfortunately this is not possible because it is a dynamically generated list.

However doing a bit of searching I see there a few ways to attempt what you want.

The first way is by using javascript to add the class to the item.
https://stackoverflow.com/questions/32631319/add-class-the-option-selected

The second option is to use some pseudo css to style the selected option like here in the link below.
https://stackoverflow.com/questions/8619406/css-selected-pseudo-class-similar-to-checked-but-for-select-elements

Please let me know if these were able to help you.

Thanks,
Shane

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