facetwp change template div to ul

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** changes <div class=”facetwp-template” in facetwp template shortcode output to a ul
** will not work if facetwp_use_pager_seo is true
**/

add_filter( ‘facetwp_shortcode_html’, function( $output, $atts ) {
if ( !empty( $atts[‘template’] ) && ‘example’ == $atts[‘template’] ) { // change “example” to your template name
$output = str_replace( ‘<div class=”facetwp-template”‘, ‘<ul class=”facetwp-template”‘, $output );
$output = substr_replace( $output, ‘</ul>’, -6 );
}
return $output;
}, 10, 2 );
{{/gist}}