This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Product Query: First attempt at adding patterns * Product Query: Update patterns and the default block template * Product Query: And new and update existing patterns * Product Query: Adjust layout of the Minimal Product Row pattern * Product Query: Update pattern names * Product Query: Polish spaces between blocks inside the patterns * Product Query patterns: Link product titles and improve spacing between product elements * Product Query patterns: Button font-size update * Product Query patterns: Center the pagination * Product Query patterns: Center the pagination for the default pattern * Product Query patterns: Remove an empty column * Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
- Loading branch information
1 parent
f71769a
commit bdc8f99
Showing
14 changed files
with
369 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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
33 changes: 33 additions & 0 deletions
33
patterns/product-query-1-1-image-4-column-products-row.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce 1:1 Image 4-Column Products Row | ||
* Slug: woocommerce-blocks/product-query-1-1-image-4-column-products-row | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":1,"query":{"perPage":"4","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":4},"namespace":"woocommerce/product-query"} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:woocommerce/product-image {"isDescendentOfQueryLoop":true} /--> | ||
|
||
<!-- wp:post-title {"textAlign":"center","level":3,"isLink":true,"fontSize":"medium"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
|
||
<!-- wp:woocommerce/product-button {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce 3-Column Product Row | ||
* Slug: woocommerce-blocks/product-query-3-column-product-row | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":1,"query":{"perPage":"3","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":3},"namespace":"woocommerce/product-query"} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:woocommerce/product-image {"isDescendentOfQueryLoop":true} /--> | ||
|
||
<!-- wp:woocommerce/product-rating {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
|
||
<!-- wp:post-title {"textAlign":"center","level":3,"isLink":true,"style":{"spacing":{"margin":{"top":"0","bottom":"1rem"}}},"fontSize":"medium"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce 4-Column Product Row | ||
* Slug: woocommerce-blocks/product-query-4-column-product-row | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":1,"query":{"perPage":"4","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":4},"namespace":"woocommerce/product-query","layout":{"type":"default"}} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:woocommerce/product-image {"isDescendentOfQueryLoop":true} /--> | ||
|
||
<!-- wp:post-title {"isLink":true,"fontSize":"medium"} /--> | ||
|
||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","verticalAlignment":"top","justifyContent":"space-between","orientation":"horizontal"}} --> | ||
<div class="wp-block-group"><!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"fontSize":"small"} /--> | ||
|
||
<!-- wp:woocommerce/product-rating {"isDescendentOfQueryLoop":true,"fontSize":"small"} /--></div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:woocommerce/product-button {"isDescendentOfQueryLoop":true,"fontSize":"small","style":{"spacing":{"margin":{"top":"1em"}}}} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce Large Image Product Gallery | ||
* Slug: woocommerce-blocks/product-query-large-image-product-gallery | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":1,"query":{"perPage":"4","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":2},"namespace":"woocommerce/product-query"} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:woocommerce/product-image {"saleBadgeAlign":"left","isDescendentOfQueryLoop":true} /--> | ||
|
||
<!-- wp:post-title {"textAlign":"center","level":3,"isLink":true,"style":{"spacing":{"margin":{"bottom":"1rem"}}},"fontSize":"medium"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce Minimal 5-Column Products Row | ||
* Slug: woocommerce-blocks/product-query-minimal-5-column-products-row | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":1,"query":{"perPage":"5","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":5},"namespace":"woocommerce/product-query","layout":{"type":"default"}} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:woocommerce/product-image {"saleBadgeAlign":"left","isDescendentOfQueryLoop":true} /--> | ||
|
||
<!-- wp:columns --> | ||
<div class="wp-block-columns"><!-- wp:column {"width":"50%"} --> | ||
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:post-title {"isLink":true,"fontSize":"small"} /--></div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"width":"50%"} --> | ||
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"right","fontSize":"small"} /--></div> | ||
<!-- /wp:column --></div> | ||
<!-- /wp:columns --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce Minimal Product List | ||
* Slug: woocommerce-blocks/product-query-minimal-product-list | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":0,"query":{"perPage":"5","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"list","columns":2},"namespace":"woocommerce/product-query"} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:columns {"isStackedOnMobile":false} --> | ||
<div class="wp-block-columns is-not-stacked-on-mobile"><!-- wp:column {"width":"33.33%"} --> | ||
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:woocommerce/product-image {"isDescendentOfQueryLoop":true} /--></div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"width":"66.66%","layout":{"type":"default"}} --> | ||
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:woocommerce/product-rating {"isDescendentOfQueryLoop":true,"fontSize":"small","style":{"spacing":{"margin":{"bottom":"0"}}}} /--> | ||
|
||
<!-- wp:post-title {"level":3,"isLink":true,"style":{"spacing":{"margin":{"top":"0"}}},"fontSize":"large"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"fontSize":"small"} /--></div> | ||
<!-- /wp:column --></div> | ||
<!-- /wp:columns --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce Product Gallery | ||
* Slug: woocommerce-blocks/product-query-product-gallery | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":0,"query":{"perPage":"6","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceAttributes":[],"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":3},"namespace":"woocommerce/product-query"} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:woocommerce/product-image {"saleBadgeAlign":"left","isDescendentOfQueryLoop":true} /--> | ||
|
||
<!-- wp:woocommerce/product-rating {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
|
||
<!-- wp:post-title {"textAlign":"center","level":3,"isLink":true,"style":{"spacing":{"margin":{"top":"0"}}},"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-query/product-title"} /--> | ||
|
||
<!-- wp:post-excerpt {"textAlign":"center","showMoreOnNewLine":false,"style":{"spacing":{"margin":{"top":"0"}}},"fontSize":"small","__woocommerceNamespace":"woocommerce/product-query/product-summary"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Title: WooCommerce Product list with 1:1 images | ||
* Slug: woocommerce-blocks/product-query-product-list-with-1-1-images | ||
* Categories: WooCommerce | ||
* Block Types: core/query/woocommerce/product-query | ||
*/ | ||
?> | ||
<!-- wp:query {"queryId":0,"query":{"perPage":"5","pages":0,"offset":0,"postType":"product","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"list","columns":2},"namespace":"woocommerce/product-query"} --> | ||
<div class="wp-block-query"><!-- wp:post-template --> | ||
<!-- wp:columns {"isStackedOnMobile":false} --> | ||
<div class="wp-block-columns is-not-stacked-on-mobile"><!-- wp:column {"width":"33.33%"} --> | ||
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:woocommerce/product-image {"saleBadgeAlign":"left","isDescendentOfQueryLoop":true} /--></div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"width":"66.66%","layout":{"type":"default"}} --> | ||
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:woocommerce/product-rating {"isDescendentOfQueryLoop":true,"fontSize":"small"} /--> | ||
|
||
<!-- wp:post-title {"level":3,"isLink":true,"style":{"spacing":{"margin":{"top":"0"}}},"fontSize":"large"} /--> | ||
|
||
<!-- wp:post-excerpt {"style":{"spacing":{"margin":{"top":"0"}}},"fontSize":"small","__woocommerceNamespace":"woocommerce/product-query/product-summary"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"fontSize":"small"} /--> | ||
|
||
<!-- wp:woocommerce/product-button {"isDescendentOfQueryLoop":true,"fontSize":"small"} /--></div> | ||
<!-- /wp:column --></div> | ||
<!-- /wp:columns --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --> |
Oops, something went wrong.