facetwp facetwp-template for woocommerce

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** wrap main content with facetwp-template class **/
add_action( ‘woocommerce_before_shop_loop’, function() {
if ( !is_singular() ) { ?>
<div class=”facetwp-template”>
<?php }
}, 5);
add_action( ‘woocommerce_after_shop_loop’, function() {
if ( !is_singular() ) { ?>
</div><!– end facetwp-template –>
<?php }
}, 15);
add_action( ‘woocommerce_no_products_found’, function() {
if ( !is_singular() ) { ?>
<div class=”facetwp-template”>
<?php }
}, 5);
add_action( ‘woocommerce_no_products_found’, function() {
if ( !is_singular() ) { ?>
</div><!– end facetwp-template –>
<?php }
}, 15);
{{/gist}}