Last active
January 19, 2021 19:26
-
-
Save djrmom/d6d01522e1b74cc3e27bac395b8f077b to your computer and use it in GitHub Desktop.
facetwp bigcommerce shortcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Product Group Template for Bigcommerce modified for FacetWP | |
* add to your_theme/bigcommerce/components/products/product-shortcode-grid.php | |
* @var string[] $cards | |
* @var string $pagination | |
* @var bool $wrap Whether to wrap the output in a div | |
* @var int $columns The number of columns to use for the grid | |
* @version 1.0.0 | |
*/ | |
?> | |
<?php if ( $wrap ) { ?> | |
<div class="bc-load-items bc-shortcode-product-grid-wrapper"> | |
<!-- class="bc-product-grid bc-load-items-container" removes "bc-load-items-container--has-pages" for facet --> | |
<div class="facetwp-template bc-product-grid bc-product-grid--<?php echo intval( $columns ); ?>col bc-load-items-container"> | |
<?php } ?> | |
<?php | |
foreach ( $cards as $card ) { | |
echo $card; | |
} | |
echo facetwp_display( 'pager', true ); // change this to a custom facet pager if preferred - facetwp_display( 'facet', 'my_pager_facet_name ) | |
?> | |
<?php if ( $wrap ) { ?> | |
</div> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment