Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
facetwp change template div to ul
/** 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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.