Live Filter – set default filter (activate a filter at the beginning)

By default, the “All” option is active for the Checkbox, Radio, Dropdown, Button types of Live Filter.
To activate another option for these types at the beginning, please add this code to Custom JS field in Content Views >> Settings page:

/* Live Filter - set default filter */
function cvp_lf_default_option(term_slug, view_id){
    if (! {
        var $el = $('[value="' + term_slug + '"]', '[data-sid="' + view_id + '"]');
        $($el).attr("checked", true);
        $($el).attr("selected", true);
// duplicate the below line for another view, and change values respectively
cvp_lf_default_option('SELECTED_OPTION_HERE', 'VIEW_ID_HERE');


  • replace SELECTED_OPTION_HERE with the value you want to select by default.
    To get that value, please:
    + open the page with Live Filter
    + select the option you want to select by default
    + the URL in browser’s address bar will be changed accordingly and end with:


    + copy the VALUE to replace the SELECTED_OPTION_HERE in the code.

    For example, you show categories as filters and want to select the “Business” option by default.
    When you select that option, the URL ends with: /?tx_category=business.
    Then business is VALUE you should copy and put in the code.

  • replace VIEW_ID_HERE with ID of your View.

Best regards,