Passer la navigation

[Résolu] style taxonomies list displayed on single post content template

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
style taxonomies terms list displayed on single post using content template using custom HTML

Solution:
The workaround would be to write custom shortcode that should return the terms with your desired formatting.

Relevant Documentation:
=> https://toolset.com/documentation/programmer-reference/adding-custom-code/how-to-create-a-custom-shortcode/

This support ticket is created Il y a 4 years, 6 months. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par davidP-26 Il y a 4 years, 6 months.

Assisté par: Minesh.

Auteur
Publications
#2244993

Hello

I would like to style taxonomy list that belongs to particular custom post type. I created this list using Single Field and field type Taxonomy. I get the correct list, but list is plain text inside html. I need some tag or span around each item so I can style them individually.
How can I do that?

#2245011

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please tell me what shortcode you are using to display the taxonomy terms?

#2245021

I don't use shortcode, i just use toolset single field block to display list.

I managed to do a workaround. For field options I chose "Link to term archive page" and that gives me a tag around each item. I then styled this item and removed links via css.

Is there a better option, for example to get an unordered list?

#2245031

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Ok - I do not see any other way other than the workaround you shared or another workaround would be to write custom shortcode that should return the terms with your desired formatting.

#2245035

My issue is resolved now. Thank you!