facetwp_shortcode_html
Overview
Override the (placeholder) HTML for any FacetWP shortcode.
Parameters
- $output | string | The output HTML
- $atts | array | The array of shortcode attributes
Usage
Add an extra foobar
CSS class to the pager shortcode:
add_filter( 'facetwp_shortcode_html', function( $output, $atts ) {
if ( isset( $atts['pager'] ) ) {
$output = str_replace( 'facetwp-pager', 'facetwp-pager foobar', $output );
}
return $output;
}, 10, 2 );