facetwp_template_html
Overview
This filter lets you override a FacetWP template’s output.
Parameters
- $output | string | The output HTML
- $class | object | The
FacetWP_Renderer
class instance
Usage
<?php
add_filter( 'facetwp_template_html', function( $output, $class ) {
$GLOBALS['wp_query'] = $class->query;
ob_start();
while ( have_posts() ): the_post(); ?>
<p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
<?php endwhile;
return ob_get_clean();
}, 10, 2 );