Skip Navigation

[Resolved] Looking to add FontAwesome symbols to Post Taxonomies

This support ticket is created 6 years, 3 months ago. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1147080

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!

#1149908

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.