I'm want to add specified FontAwesome symbols to different Post Taxonomies, e.g. [wpv-post-taxonomy type="anordning" format="name" separator=" | "]. The desired result is: "*icon* Taxonomy 1", where all taxonomies would have different icons. Thank you!
Hi, I apologize for the delay in support service here. We had a problem in the forum and somehow this ticket was not assigned correctly. To answer your question, you can use a View of the anordning taxonomy to loop over taxonomy terms and output a specific icon with the term title. Here's how I would set it up.
- Create a single line text custom field called fa-icon or something similar. Assign this custom field to the anordning taxonomy.
- Edit each term in the anordning taxonomy. Save the dynamic part of the slug for each icon in the fa-icon field, for example, "fa-envelope" for the envelope icon.
- Create a View of the anordning taxonomy.
- Add a Query Filter by term, where the term is set by the current post.
- In the Loop Editor, build the icon HTML and insert the fa-icon custom field.
<wpv-loop>
<i class="fa [type termmeta='fa-icon' output='raw'][/types]"></i> [wpv-taxonomy-title]
</wpv-loop>
- Place this View in your Content Template.
Let me know if you have additional questions about this.