Skip Navigation

[Gelöst] Create dynamical class css with taxonomy

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

How to use the taxonomy as the HTML class attribute for CSS styling?

Solution:

- Enable the legacy views:
https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/
- Use the steps below to create the view:
https://toolset.com/documentation/legacy-features/views-plugin/
- Now you will have access to the HTML code and you can use the views shortcodes to add the taxonomy as an HTML class.

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

This support ticket is created vor 1 Jahr, 11 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Fred vor 1 Jahr, 11 Monaten.

Assistiert von: Christopher Amirian.

Author
Artikel
#2499125

Hello there !

It is possible with toolet blocks to create dynamicals class css on a container or a fields against taxonomy for exemple ?

Thanks a lot for you're help

#2500205

Christopher Amirian
Supporter

Sprachen: Englisch (English )

Hi there,

With the Toolset Blocks plugin using Block Editor in WordPress you do not have access to the underlying code to be able to add a dynamic HTML class.

You can enable the legacy mode in Toolset:

https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

Using that, you can add a classic view to add the dynamic information, and there you will have access to the HTML code and you can add whatever dynamic item you want via Toolset shortcodes or the Toolset button in the WYSIWYG editor that helps you generate those shortcodes.

For more information on how to add a classic view:

https://toolset.com/documentation/legacy-features/views-plugin/

And here is the shortcodes list that you can use to retrieve the custom fields:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

Thanks.

#2500919

That's work very good thanks so much !