Live Filter – hide all posts at the beginning

By default, posts will be visible under filters list of Live Filter.
To hide these posts at page load, Please add this code to Custom JS field in Content Views >> Settings page:

/* Live Filter – Hide results at beginning */
var view_id="VIEW_ID",$view=$("#pt-cv-view-"+view_id),$pagination=$(".pt-cv-pagination-wrapper [data-sid="+view_id+"]").parent();new RegExp($(".cvp-live-filter").map(function(){return $(this).data("name")}).get().join("|")).test(window.location.search)||($view.hide(),$pagination.hide());

Please replace VIEW_ID with ID of your View. Also, ensure there is NO space between quotes.

Best regards,

Scroll to Top