{"id":1892,"date":"2017-08-02T03:36:01","date_gmt":"2017-08-02T03:36:01","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=1892"},"modified":"2023-12-27T10:45:22","modified_gmt":"2023-12-27T10:45:22","password":"","slug":"add-clear-button-shuffle-filter-checkboxes","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/add-clear-button-shuffle-filter-checkboxes\/","title":{"rendered":"Shuffle Filter &#8211; add &#8220;Clear&#8221; button for checkboxes type"},"content":{"rendered":"<p>Content Views Pro helps you to show taxonomies as filter options easily. You can display these options in many type of output, one of them is checkboxes, which you can see <a href=\"https:\/\/contentviewspro.com\/demo\/shuffle-filter\/#checkbox\" target=\"_blank\" rel=\"noopener noreferrer\">the sample here<\/a>.<\/p>\n<p>To add &#8220;Clear All Filters&#8221; button before the filter bar, please:<\/p>\n<ul>\n<li>Add this HTML before the View shortcode:\n<pre style=\"font-size: 13px;\">&lt;a href=\"#\" class=\"clear-filter\" id=\"clearFilters\"&gt;Clear All Filters&lt;\/a&gt;\n[pt_view id=\"YOUR_VIEW_ID\"]\n<\/pre>\n<\/li>\n<li>Add this code to <strong>Custom JS<\/strong> field in Content Views &gt;&gt; Settings page:\n<pre style=\"font-size: 13px;\">\/* Shuffle Filter - add Clear button for checkboxes type *\/\nwindow.sf_enable_trigger = true;\n$('.clear-filter').on('click',function(e){e.preventDefault();\nvar $last_checked = $('.pt-cv-filter-option.selected').last();\n$('.pt-cv-filter-option.selected').not($last_checked).removeClass('selected');\n$last_checked.trigger('click');\n});\n<\/pre>\n<\/li>\n<\/ul>\n<p>Best regards,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Content Views Pro helps you to show taxonomies as filter options easily. You can display these options in many type of output, one of them is checkboxes, which you can see the sample here. To add &#8220;Clear All Filters&#8221; button before the filter bar, please: Add this HTML before the View shortcode: &lt;a href=&#8221;#&#8221; class=&#8221;clear-filter&#8221; &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/add-clear-button-shuffle-filter-checkboxes\/\"> <span class=\"screen-reader-text\">Shuffle Filter &#8211; add &#8220;Clear&#8221; button for checkboxes type<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[53],"doc_tag":[33],"class_list":["post-1892","docs","type-docs","status-publish","hentry","doc_category-shuffle-filter","doc_tag-shuffle-filter"],"year_month":"2026-09","word_count":129,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"CVP","author_nicename":"cvp","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/cvp\/"},"doc_category_info":[{"term_name":"Shuffle Filter","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/shuffle-filter\/"}],"doc_tag_info":[{"term_name":"shuffle filter","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/shuffle-filter\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=1892"}],"version-history":[{"count":1,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1892\/revisions"}],"predecessor-version":[{"id":4873,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1892\/revisions\/4873"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=1892"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=1892"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=1892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}