/**
** adds is-hidden class to facetwp template to initial hide template.
** for use with conditional logic addon to show/hide template with
** conditions, prevents flash of content when hidden is the initial
** state
**/
add_filter( 'facetwp_shortcode_html', function( $output, $atts ) {
if ( isset( $atts['template'] ) && 'my_template' == $atts['template'] ) { // change my_template to match your template
$output = str_replace( 'class="facetwp-template"', 'class="facetwp-template is-hidden"', $output );
}
return $output;
}, 10, 2 );