How to Add FacetWP to Astra WordPress Theme

The following code should be added to your functions.php file of your child theme for Astra. This is needed because FacetWP has trouble adding the CSS class facetwp-template into the primary content of the archive page.

add_filter( 'astra_primary_class', function ($classes) {
	$classes[] = 'facetwp-template';
	return $classes;
    }
);

Scroll to Top