kpetrowski
11/1/2018 - 6:01 PM

FacetWP Presort page based on URL

<?php // FacetWP Presort PREACHERS COLLECTION
add_filter( 'facetwp_preload_url_vars', function( $url_vars ) {
    if ( 'preacherscollection' == FWP()->helper->get_uri() ) {
        if ( empty( $url_vars['types'] ) ) {
            $url_vars['types'] = array( 'sermons' );
        }
    }
    return $url_vars;
} );	
?>