2023-04-25 14:22:58 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2023-10-05 08:36:18 +00:00
|
|
|
* Title: Product Collection: Featured Products 5 Columns
|
|
|
|
* Slug: woocommerce-blocks/product-collection-featured-products-5-columns
|
2023-04-25 14:22:58 +00:00
|
|
|
* Categories: WooCommerce
|
|
|
|
*/
|
2023-09-25 09:48:52 +00:00
|
|
|
|
|
|
|
use Automattic\WooCommerce\Blocks\Patterns\PatternsHelper;
|
2023-10-05 08:36:18 +00:00
|
|
|
$content = PatternsHelper::get_pattern_content( 'woocommerce-blocks/product-collection-featured-products-5-columns' );
|
2023-10-13 08:08:35 +00:00
|
|
|
|
|
|
|
$collection_title = $content['titles'][0]['default'] ?? '';
|
2023-04-25 14:22:58 +00:00
|
|
|
?>
|
2023-10-05 11:49:26 +00:00
|
|
|
|
|
|
|
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30","left":"var:preset|spacing|30","right":"var:preset|spacing|30"}}},"layout":{"type":"constrained"}} -->
|
|
|
|
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)">
|
|
|
|
|
|
|
|
<!-- wp:heading {"textAlign":"center","level":3} -->
|
|
|
|
<h3 class="wp-block-heading has-text-align-center">
|
2023-10-13 08:08:35 +00:00
|
|
|
<?php echo esc_html( $collection_title ); ?>
|
2023-10-05 11:49:26 +00:00
|
|
|
</h3>
|
|
|
|
<!-- /wp:heading -->
|
2023-04-25 14:22:58 +00:00
|
|
|
|
2023-10-11 07:11:57 +00:00
|
|
|
<!-- wp:woocommerce/product-collection {"query":{"perPage":5,"pages":0,"offset":0,"postType":"product","order":"asc","orderBy":"title","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":{},"parents":[],"isProductCollectionBlock":true,"woocommerceOnSale":false,"woocommerceStockStatus":["instock","outofstock","onbackorder"],"woocommerceAttributes":[],"woocommerceHandPickedProducts":[]},"tagName":"div","displayLayout":{"type":"flex","columns":5},"align":"wide"} -->
|
|
|
|
<div class="wp-block-woocommerce-product-collection alignwide">
|
|
|
|
<!-- wp:woocommerce/product-template -->
|
|
|
|
<!-- wp:woocommerce/product-image {"imageSizing":"thumbnail","isDescendentOfQueryLoop":true} /-->
|
2023-04-25 14:22:58 +00:00
|
|
|
|
2023-10-11 07:11:57 +00:00
|
|
|
<!-- wp:post-title {"textAlign":"left","level":3,"isLink":true,"style":{"spacing":{"margin":{"bottom":"0.75rem","top":"0"}}},"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-collection/product-title"} /-->
|
2023-04-25 14:22:58 +00:00
|
|
|
|
2023-10-11 07:11:57 +00:00
|
|
|
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"left","fontSize":"small"} /-->
|
|
|
|
<!-- /wp:woocommerce/product-template -->
|
|
|
|
</div>
|
|
|
|
<!-- /wp:woocommerce/product-collection -->
|
2023-04-25 14:22:58 +00:00
|
|
|
|
2023-10-05 11:49:26 +00:00
|
|
|
<!-- wp:buttons {"align":"wide","layout":{"type":"flex","verticalAlignment":"center","justifyContent":"center"}} -->
|
|
|
|
<div class="wp-block-buttons alignwide">
|
|
|
|
<!-- wp:button {"textAlign":"center"} -->
|
|
|
|
<div class="wp-block-button">
|
|
|
|
<a class="wp-block-button__link has-text-align-center wp-element-button" href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>">
|
|
|
|
<?php esc_html_e( 'Shop All', 'woo-gutenberg-products-block' ); ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<!-- /wp:button -->
|
2023-04-25 14:22:58 +00:00
|
|
|
</div>
|
2023-10-05 11:49:26 +00:00
|
|
|
<!-- /wp:buttons -->
|
2023-04-25 14:22:58 +00:00
|
|
|
</div>
|
2023-10-05 11:49:26 +00:00
|
|
|
<!-- /wp:group -->
|