Skip Navigation

[Resolved] Styling filter checkboxes

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

Last updated by Ben 5 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1204029

Ben

When I have a custom search filter such as:

[wpv-control url_param="wpv-post-type" type="checkboxes" values=",posts,pages" display_values="All,Posts,Pages"]

How would I go about customising these? For example, whether the check box options are listed horizontally or vertically.

#1204685

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Ben,

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

Assuming that your website has Bootstrap 3 enabled, you can use its built-in classes to show the checkboxes, horizontally or vertically.

For example, to show them vertically, you can use:


<div class="checkbox">
[wpv-control url_param="wpv-post-type" type="checkboxes" values=",posts,pages" display_values="All,Posts,Pages"]
</div>

To show them, horizontally in a line, you'll need some custom script, to add a special class "checkbox-inline".

1. Use the shortcode like this:


<div class="checkbox special-inline">
[wpv-control url_param="wpv-post-type" type="checkboxes" values=",posts,pages" display_values="All,Posts,Pages"]
</div>

2. And in the "JS editor" tab of the "Search and Pagination" section, you can add:


jQuery( document ).ready(function() {
    jQuery( ".special-inline .wpcf-checkboxes-group .form-item-checkbox" ).addClass( "checkbox-inline" );
});

For more personalized assistance around custom styles and scripts, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1205005

Ben

Thank you Waqar!

This is perfect!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.