Skip Navigation

[Résolu] Style taxonomy terms in a list

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

Problem:
How can I show the Terms of a taxonomy as a List, on a post View?

Solution:
The ShortCode

wpv-post-taxonomy

supports a separator.

This is what you will use to create a list.

You will need to open and close the List HTML tags in the separator argument.

As example, this below in a Views Loop will produce a List of Terms names:

<li>[wpv-post-taxonomy type='category' format='name' separator='</li><li>']</li>

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.

This topic contains 2 réponses, has 2 voix.

Last updated by jeffreyS-5 Il y a 5 années et 1 mois.

Assigned support staff: Beda.

Auteur
Publications
#439624

I am trying to: style individual taxonomy terms in a list

I visited this URL: https://toolset.com/forums/topic/style-individual-taxonomy-type/

I expected to see: a solution

Instead, I got: doesn't work

I have custom posts. A parent and a child.
The parent post has taxonomy terms associated with it.
On a child post, I'd like to list all the taxonomy terms associated with its parent.

I am able to do this simply using [wpv-post-taxonomy type='TAXONOMY' id='$PARENT']

However, I'm not able to style the individual terms. I'm only able to style the list of terms as a single unit.

Thanks.

#439703

This ShortCode supports a separator.

This is what you will use to create a list.

You will need to open and close the List HTML tags in the separator argument.

As example, this below in a Views Loop will produce a List of Terms names:

<li>[wpv-post-taxonomy type='category' format='name' separator='</li><li>']</li>
#440066

Perfect!

Thanks.