Problem:
I have to display different icons (png) in the template according to custom taxonomy (categories and subcategories).
Solution:
This is possible with a taxonomy view + a custom taxonomy image field, for example:
1) Create a taxonomy image field "my-icon"
2) Dashboard-> Toolset-> Views, Create a taxonomy view, for example "my-view"
- Query terms of your taxonomy "categories"
- Filter by:
Taxonomy is set by the current post
- In view's loop, display the custom image field "my-icon" shortcode
3) In single post content, display above taxonomy view shortcode, for example:
[wpv-view name="my-view"]
Relevant Documentation:
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 5 replies, has 2 voices.
Last updated by 4 years, 7 months ago.
Assisted by: Luo Yang.