Skip Navigation

[Resolved] Number of item for each filter

This support ticket is created 6 years, 5 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 18 replies, has 2 voices.

Last updated by Minesh 6 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#922682

Hello How can I display the number of items of my filtering like this website :
hidden link

Regards
Leonardo

#922799

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - when you add a filter to your view for custom filed, you will see a attribute format to display the number of counts.

format (opt):
'%%COUNT%% %%NAME%%'
%%COUNT% will display the number of post for the taxonomy term and %%NAME%, the taxonomy term.
e.g. format='%%NAME%% (%%COUNT%%)'

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

For Taxonomy filter:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-taxonomy

#922818

Hi, many thanks,
if I want a checkbox control type how can I use in the custom filter like this website :
hidden link

Regards
Leonardo

#922835

Hi, thanks,
must I put your code in Output Editor ?
format (opt):
'%%COUNT%% %%NAME%%'
%%COUNT% will display the number of post for the taxonomy term and %%NAME%, the taxonomy term.
e.g. format='%%NAME%% (%%COUNT%%)'

Regards
Leonardo

#922848

I resolved this question:
Hi, thanks,
must I put your code in Output Editor ?
format (opt):
'%%COUNT%% %%NAME%%'
%%COUNT% will display the number of post for the taxonomy term and %%NAME%, the taxonomy term.
e.g. format='%%NAME%% (%%COUNT%%)'

#922859

the problem is with css code, it doesn't work for class="form-group"

#922860

the problem is with css code, it doesn't work for class="form-group"

[wpv-filter-start hide="false"]
[wpv-filter-controls]

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tipo di ristoranti[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tipo-di-ristorante" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tipo-di-ristorante"]
</div>

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tour types[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tour-type" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tour-type"]
</div>
[/wpv-filter-controls]

[wpv-filter-end]

............

.form-group {
background-color: rgba(255, 255, 255, 0.7);

display: inline-block;

vertical-align: top;
}

#922861

the problem is with css code, it doesn't work for class="form-group"

[wpv-filter-start hide="false"]
[wpv-filter-controls]

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tipo di ristoranti[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tipo-di-ristorante" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tipo-di-ristorante"]
</div>

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tour types[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tour-type" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tour-type"]
</div>
[/wpv-filter-controls]

[wpv-filter-end]

............

.form-group {
background-color: rgba(255, 255, 255, 0.7);

display: inline-block;

vertical-align: top;
}

#922863

the problem is with css code, it doesn't work for class="form-group"

[wpv-filter-start hide="false"]
[wpv-filter-controls]

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tipo di ristoranti[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tipo-di-ristorante" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tipo-di-ristorante"]
</div>

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tour types[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tour-type" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tour-type"]
</div>
[/wpv-filter-controls]

[wpv-filter-end]

.................
Editor CSS
.................
.form-group {
background-color: rgba(255, 255, 255, 0.7);

display: inline-block;

vertical-align: top;
}

#922864

the problem is with css code, it doesn't work for class="form-group"

[wpv-filter-start hide="false"]
[wpv-filter-controls]

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tipo di ristoranti[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tipo-di-ristorante" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tipo-di-ristorante"]
</div>

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tour types[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tour-type" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tour-type"]
</div>
[/wpv-filter-controls]

[wpv-filter-end]

.................
Editor CSS
.................
.form-group {
background-color: rgba(255, 255, 255, 0.7);

display: inline-block;

vertical-align: top;
}

#922866

the problem is with css code, it doesn't work for class="form-group"

[wpv-filter-start hide="false"]
[wpv-filter-controls]

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tipo di ristoranti[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tipo-di-ristorante" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tipo-di-ristorante"]
</div>

<div class="form-group">
<label>[wpml-string context="wpv-views"]Tour types[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="tour-type" type="checkboxes" format="%%NAME%%: %%COUNT%%" url_param="wpv-tour-type"]
</div>
[/wpv-filter-controls]

[wpv-filter-end]

.................
Editor CSS
.................
.form-group {
background-color: rgba(255, 255, 255, 0.7);

display: inline-block;

vertical-align: top;
}

#922876

Minesh
Supporter

Languages: English (English )

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

https://toolset.com/forums/topic/number-of-item-for-each-filter/#post-922848
=> I'm glad to know that your original issue is resolved as you confirm with above reply.

May I kindly ask you to open a new ticket with your each new question. This will help other users searching on the forum. Thank you for understanding.

However, to design your form you must have a CSS knowledge or contact CSS expert. Here are few links that may help you:
=> https://toolset.com/documentation/user-guides/adding-custom-css-views/

#922930

thanks

#922934

Can I set default "on" all checkboxs in filter section. and if my customer want define only some

#922943

Minesh
Supporter

Languages: English (English )

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

Please feel free to close this ticket and we will continue with your new question with the following new ticket:
=> https://toolset.com/forums/topic/split-number-of-item-for-each-filter-can-i-set-default-on-all-checkboxs-in-filter-section-and-if-my-customer-want-define-only-some/