Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
facetwp facetwp-template for woocommerce
<?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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment