Skip Navigation

[Resolved] How to show post numbers next to Views filter controls

This thread is resolved. Here is a description of the problem and solution.

Problem:
With a View that has filter controls, how to show the number of matching posts against each filter?

Solution:
Edit the shortcode where the filter is inserted and use the %%COUNT%% placeholder in the format attribute.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-postmeta

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 5 replies, has 2 voices.

Last updated by Ljuba 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1088175
03.png
02.png
01.png

==> Tell us what you are trying to do?

I have custom search and I have set it [wpv-found-count] per title (see image 01), but I want it to display also per search items (as it is on image 02 and 03).

So, if one item filter looks like code below, what should to be added to get [wpv-found-count] as on the images?

<div class="form-group">
	<label>[wpml-string context="wpv-views"]Room amenities[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="room-amenities" type="checkboxes" url_param="wpv-room-amenities"]
</div>
#1088299

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

This one is just not supported. Funnily enough I have another ticket in my queue discussing the same thing, although it is not something I've seen requested before.

In any case all I can do is pass this on to my colleague who manages features requests. If there is an existing request he will add your voices to it, otherwise he'll file a new request.

Although this would be a nice-to-have, it does add a certain amount of overhead to the page in terms of the queries required to provide it.

#1088367

Thanks for clear answer. Yes, I agree also vs queries, but feture is nice also. Thanks again.

#1088411

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-08-21 at 14.46.54.png

Doh.

My colleague replied back that you can already do this. It rang a bell but when I checked I couldn't see how and yet looking again it's right in front of my eyes.

Note the format option when inserting a filter, you can use the %%COUNT%% placeholder.

#1088431

YouARE THE KING. Thanks A LOT.

#1088432

I can just to repeat. You ARE THE KING. Thanks A LOT.