facetwp add facetwp-template to downloads shortcode

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** filters download shortcode to wrap text for 0 results in facetwp-template class
** text may need to be adjust to match site setting
**/

add_filter( ‘downloads_shortcode’, function( $output, $atts ) {
$output = str_replace( ‘No Products found’, ‘<div class=”facetwp-template”>No Products found</div>’, $output );
return $output;
}, 20, 2 );
{{/gist}}