Skip Navigation

[Resolved] Show taxonomy terms differently

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by fahimS-2 1 year, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2596061

I have a custom taxonomy which has terms term1, term2, term3, term4. I also have a custom post type which has some posts. Let's say a post belongs to term1 and term 2. Now I want to show the terms in the post as:
✓term1
✓term2
✕term3
✕term4
How can I do that?

#2596733

Hello,

It is possible with a taxonomy view.

See below sandbox website:
Login URL: hidden link

1) Dashboard-> Toolset-> Settings-> General,
hidden link
enable option: Show both the legacy and Blocks interface and let me choose which to use for each item I build

2) Dashboard-> Toolset-> Views, add a taxonomy view:
hidden link
- Query terms of your custom taxonomy
- disable option "Don't show empty terms"
- In view's loop, display the term information and wpv-condional shortcode, like this:

              	[wpv-conditional if="( CONTAINS(#(category),'[wpv-taxonomy-title]') )"]Yes[/wpv-conditional]
              	[wpv-conditional if="( CONTAINS(#(category),'[wpv-taxonomy-title]') )" evaluate="false"]NO[/wpv-conditional]

3) Display above taxonomy views shortcode in single post:
hidden link
[wpv-view name="show-taxonomy-terms-differently"]

Test it in frontend, it works fine:
hidden link

For your reference.

#2598129

My issue is resolved now. Thank you!