Skip Navigation

[Closed] How to display the number of records by search filter

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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 7 months ago.

Assisted by: Waqar.

Author
Posts
#2692632

Tell us what you are trying to do? I have view - list of people with 5 types custom fields in custom types with checkboxes yes/no and they uses in search filter in view. Can i show on separate page - statistic by with this 5 types filter in view - how many people have Yes or No
1 Type: Yes - (number) people;
1 Type:- No - (number) people;
....................
5 Type: Yes - (number) people;
5 Type: No - (number) people;

Is there any documentation that you are following? I try to search but my English is not very good to write right keyword.

Is there a similar example that we can see?

What is the link to your site? my site is not for public

Thank you for any information or link to documentation

#2692676

Hi,

Thank you for contacting us and I'd be happy to assist.

I understand that your custom post type has 5 different custom fields of type 'checkboxes' and each of them has two options ( 'yes' & 'no' ).

To show a list of the count of people based on those custom fields, you can create a post view that shows this custom post type. Based on your personal preference you can either use the classic editor view or the blocks-based view.

For each of these custom fields, you'll include a search field of type 'checkboxes' and in the format use:
{Field Name}: %%NAME%% - (%%COUNT%%) people;

Notes:
a). You'll replace {Field Name} with the actual name of the field.

b). In the blocks-based view, you'll see the option 'FORMAT OF THE OPTIONS' in the 'Custom Search Filter' block for each field.

c). In the classic editor views, you can specify the format through the 'format' attribute in the 'wpv-control-postmeta' shortcode:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-control-postmeta )


[wpv-control-postmeta type="checkboxes" field="wpcf-{field-slug}" url_param="wpv-wpcf-{field-slug}" format="{Field Name}: %%NAME%% - (%%COUNT%%) people;"]

Once the view is showing this list of counts, you can use the custom CSS code to hide the 'checkboxes' next to these text lines.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2692706

Thank you for answer.
I add name of my custom field but it return me value only for first type (field). Each other fields is 0. I use "text-field" in block editor
1 Type: Yes - 73people;
1 Type:- No - 0 people;
2 Type: Yes - 0 people;
2 Type: No - 0 people;
3 Type: Yes - 0 people;
3 Type: No - 0 people;
4 Type: Yes - 0 people;
4 Type: No - 0 people;
5 Type: Yes - 0 people;
5 Type: No - 0 people;

#2692768

To troubleshoot this, I'll need to see how this view is set up in the admin area.

Can you please share temporary admin login details, along with the link to the page with this view?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

The topic ‘[Closed] How to display the number of records by search filter’ is closed to new replies.