Skip Navigation

[Resolved] Adding totals in a Filter and display count

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

Problem:
Adding totals in a Filter dropdown count

Solution:
when you try to add the taxonomy filter or custom field filter, Views offers the placeholder %%COUNT%% as you can see with the screenshot:
=> https://nimb.ws/0M596o

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/

This support ticket is created 5 years, 8 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by seanM-7 5 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1236734
Untitled-1.jpg

I have a custom Search bar at the top of a View for a custom post type. Everything is working fine, but I'd like to be able to add totals to the search criteria before hitting the Search button.

1. Three of the search filters are drop downs. Can I put a total counter after each option in the drop down menu? For example; for a state search drop down menu can it have 'Alabama (X)' where X is the number of items that are in Alabama, and then for each state after it?

2. I also have a bank of checkboxes which correspond to categories. I'd also like to add totals to each of those as well.

I've included a screenshot of what I'm trying to accomplish. Thanks!

#1236797

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - when you try to add the taxonomy filter or custom field filter, Views offers the placeholder %%COUNT%% as you can see with the screenshot:
=> hidden link

With the "Format of the options" input textbox you should try to use: %%NAME%% (%%COUNT%%)

Does this information help to resolve your issue?

#1237014

Yes! That is what I was looking for! It's exactly what I was looking for, Thank You!