Saltar navegación

[Resuelto] How to display the single name for a taxonomy

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

Display single term with the shortcode [wpv-post-taxonomy]

Solution:

You can create a taxonomy view to replace the shortcode [wpv-post-taxonomy], for example:

https://toolset.com/forums/topic/how-to-display-the-single-name-for-a-taxonomy/#post-1100219

Relevant Documentation:

This support ticket is created hace 6 años, 4 meses. 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
- 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)

Etiquetado: 

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Luo Yang hace 6 años, 4 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1099692

Hi there.

I am trying to figure out how to display the taxonomy term but in singular presentation.

I am currently using this: {!{wpv-post-taxonomy type='equipment-category' format='name'}!} to pull the category name but it's coming out plural, which is great in most every place but I also need to display it as singular (within conditional formatting) on a page. eg; Bull Dozers For Sale --- is good but I also need it to 'Bull Dozer' 🙂

I feel like I should already know how to handle this but I've looked and looked and can't find how to do it. 🙂

* I just went looking again (I do not like putting in support requests. I know you all are busy). And I just realized that I could put the singular term in for the description, and pull it out that way but when my client goes to add more, it's going to create a mess.

Thanks for any help with this.

#1100219

Hello,

You can create a taxonomy view to replace the shortcode [wpv-post-taxonomy], for example:
Create a taxonomy view,
1) query terms of taxonomy "equipment-category",

2) in section "Order by Limit and Offset", display only 1 item

3) filter by
Taxonomy is set by the page where this View is inserted

4) And display the term's title with shortcode:
[wpv-taxonomy-title]

#1100550

Thank you, sir.

#1100874

You are welcome