Saltar navegación

[Resuelto] Is it possible to display the QTY of posts in a custom post type category?

This support ticket is created 3 years 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
- 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 -

Zona horaria del colaborador: Asia/Hong_Kong (GMT+08:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por carlosA-12 3 years ago.

Asistido por: Luo Yang.

Autor
Mensajes
#2600313

Tell us what you are trying to do?
Insert a line of test that states the name of a custom post type category and the (QTY) of posts.

Lets say I have a text block, and I simply want to display the number of posts in a custom post type category like - Category Name - (6)

Is this possible with toolset?

#2600577

Hello,

It is possible with taxonomy view, see below sandbox website:
Login URL: enlace oculto
1) Dashboard-> Toolset-> Settings-> General,
enlace oculto
in section "Editing experience", 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, create a new taxonomy view:
enlace oculto
- Query terms of your custom taxonomy
- In view's loop, display the term information + post count shortcode, for example:

				[wpv-taxonomy-link]
				([wpv-taxonomy-post-count])

3) Create a page, display above taxonomy view shortcode:
enlace oculto

Test it in frontend, it works fine:
enlace oculto

#2601563

I was hoping for a solution outside of the loop, something that would look like [wpv-taxonomy-post-count - cat-id-10] But I will just forget about this feature for now, maybe you will develop it at some point.
Thanks