Skip to content

Instantly share code, notes, and snippets.

@djrmom
Created September 18, 2018 19:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrmom/db61215fb48b0ed6694de2404c3646b0 to your computer and use it in GitHub Desktop.
Save djrmom/db61215fb48b0ed6694de2404c3646b0 to your computer and use it in GitHub Desktop.
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