Skip Navigation

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

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 2 replies, has 2 voices.

Last updated by carlosA-12 1 year, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#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: hidden link
1) Dashboard-> Toolset-> Settings-> General,
hidden link
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:
hidden link
- 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:
hidden link

Test it in frontend, it works fine:
hidden link

#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