banner.php
2 years ago
discount-banner-with-image.php
2 years ago
discount-banner.php
2 years ago
featured-category-cover-image.php
2 years ago
featured-category-focus.php
2 years ago
featured-category-triple.php
2 years ago
featured-products-fresh-and-tasty.php
2 years ago
filters.php
2 years ago
footer-large-dark.php
2 years ago
footer-large.php
2 years ago
footer-simple-dark.php
2 years ago
footer-simple-menu.php
2 years ago
footer-simple.php
2 years ago
footer-with-2-menus-dark.php
2 years ago
footer-with-2-menus.php
2 years ago
footer-with-3-menus.php
2 years ago
header-centered-pattern.php
2 years ago
header-essential-dark.php
2 years ago
header-essential.php
2 years ago
header-large-dark.php
2 years ago
header-large.php
2 years ago
header-minimal.php
2 years ago
hero-product-3-split.php
2 years ago
hero-product-chessboard.php
2 years ago
hero-product-split.php
2 years ago
just-arrived-full-hero.php
2 years ago
no-products-found.php
2 years ago
product-collection-3-columns.php
2 years ago
product-collection-4-columns.php
2 years ago
product-collection-5-columns.php
2 years ago
product-collection-banner.php
2 years ago
product-collection-featured-products-5-columns.php
2 years ago
product-collection-full-grid.php
2 years ago
product-collection-grid.php
2 years ago
product-collection-rows.php
2 years ago
product-collection-simple-grid.php
2 years ago
product-collections-featured-collection.php
2 years ago
product-collections-featured-collections.php
2 years ago
product-collections-newest-arrivals.php
2 years ago
product-details-listing.php
2 years ago
product-details-pattern.php
2 years ago
product-featured-2-columns.php
2 years ago
product-hero-2-col-2-row.php
2 years ago
product-hero.php
2 years ago
product-listing-with-gallery-and-description.php
2 years ago
product-query-4-column-product-row.php
2 years ago
product-query-large-image-product-gallery.php
2 years ago
product-query-minimal-product-list.php
2 years ago
product-query-product-gallery.php
2 years ago
product-query-product-list-with-1-1-images.php
2 years ago
product-query-product-list-with-full-product-description.php
2 years ago
product-search-form.php
2 years ago
related-products.php
2 years ago
shop-by-price.php
2 years ago
small-discount-banner-with-image.php
2 years ago
social-follow-us-in-social-media.php
2 years ago
store-info-alt-image-and-text.php
2 years ago
testimonials-3-columns.php
2 years ago
testimonials-single.php
2 years ago
shop-by-price.php
140 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Shop by Price |
| 4 | * Slug: woocommerce-blocks/shop-by-price |
| 5 | * Categories: WooCommerce |
| 6 | */ |
| 7 | |
| 8 | use Automattic\WooCommerce\Blocks\Patterns\PatternsHelper; |
| 9 | |
| 10 | $first_title = $content['titles'][0]['default'] ?? ''; |
| 11 | $second_title = $content['titles'][1]['default'] ?? ''; |
| 12 | $third_title = $content['titles'][2]['default'] ?? ''; |
| 13 | $fourth_title = $content['titles'][3]['default'] ?? ''; |
| 14 | ?> |
| 15 | <!-- wp:columns {"align":"wide"} --> |
| 16 | <div class="wp-block-columns alignwide"> |
| 17 | <!-- wp:column {"width":"25%","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":"10px"}},"layout":{"type":"default"}} --> |
| 18 | <div class="wp-block-column" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;flex-basis:25%"> |
| 19 | <!-- wp:cover {"customOverlayColor":"#e09300","minHeight":130,"minHeightUnit":"px","contentPosition":"top left","isDark":false,"className":"is-light has-background-color has-text-color","style":{"spacing":{"blockGap":"0em","padding":{"top":"0.8em"}}}} --> |
| 20 | <div class="wp-block-cover is-light has-custom-content-position is-position-top-left has-background-color has-text-color" style="padding-top:0.8em;min-height:130px"> |
| 21 | <span aria-hidden="true" class="wp-block-cover__background has-background-dim-100 has-background-dim" style="background-color:#e09300"></span> |
| 22 | <div class="wp-block-cover__inner-container"> |
| 23 | <!-- wp:paragraph {"align":"left","placeholder":"Write title…","style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}}} --> |
| 24 | <p class="has-text-align-left has-text-color has-link-color" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?rating_filter=5">Highest</a></p> |
| 25 | <!-- /wp:paragraph --> |
| 26 | |
| 27 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"fontSize":"large"} --> |
| 28 | <p class="has-text-color has-link-color has-large-font-size" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><strong><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?rating_filter=5">rated</a></strong></p> |
| 29 | <!-- /wp:paragraph --> |
| 30 | </div> |
| 31 | </div> |
| 32 | <!-- /wp:cover --> |
| 33 | |
| 34 | <!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center","verticalAlignment":"center"}} --> |
| 35 | <div class="wp-block-buttons"> |
| 36 | <!-- wp:button {"textColor":"contrast","style":{"border":{"width":"0px","style":"none"},"spacing":{"padding":{"left":"0","right":"0","top":"0","bottom":"0"}}},"className":"is-style-outline","fontSize":"small"} --> |
| 37 | <div class="wp-block-button has-custom-font-size is-style-outline has-small-font-size"> |
| 38 | <a class="wp-block-button__link has-contrast-color has-text-color wp-element-button" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?rating_filter=5" style="border-style:none;border-width:0px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><strong><?php echo esc_html( $first_title ); ?></strong></a> |
| 39 | </div> |
| 40 | <!-- /wp:button --> |
| 41 | </div> |
| 42 | <!-- /wp:buttons --> |
| 43 | </div> |
| 44 | <!-- /wp:column --> |
| 45 | |
| 46 | <!-- wp:column {"width":"25%","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":"10px"}},"layout":{"type":"default"}} --> |
| 47 | <div class="wp-block-column" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;flex-basis:25%"> |
| 48 | <!-- wp:cover {"customOverlayColor":"#6f64f1","minHeight":130,"minHeightUnit":"px","contentPosition":"top left","className":"has-background-color has-text-color","style":{"spacing":{"blockGap":"0.8em","padding":{"top":"0.8em"}}}} --> |
| 49 | <div class="wp-block-cover has-custom-content-position is-position-top-left has-background-color has-text-color" style="padding-top:0.8em;min-height:130px"> |
| 50 | <span aria-hidden="true" class="wp-block-cover__background has-background-dim-100 has-background-dim" style="background-color:#6f64f1"></span> |
| 51 | <div class="wp-block-cover__inner-container"> |
| 52 | <!-- wp:paragraph {"align":"left","placeholder":"Write title…","style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}}} --> |
| 53 | <p class="has-text-align-left has-text-color has-link-color" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=15">Under</a></p> |
| 54 | <!-- /wp:paragraph --> |
| 55 | |
| 56 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"fontSize":"large"} --> |
| 57 | <p class="has-text-color has-link-color has-large-font-size" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><strong><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=15">$15</a></strong></p> |
| 58 | <!-- /wp:paragraph --> |
| 59 | </div> |
| 60 | </div> |
| 61 | <!-- /wp:cover --> |
| 62 | |
| 63 | <!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center","verticalAlignment":"center"}} --> |
| 64 | <div class="wp-block-buttons"> |
| 65 | <!-- wp:button {"textColor":"contrast","style":{"border":{"width":"0px","style":"none"},"spacing":{"padding":{"left":"0","right":"0","top":"0","bottom":"0"}}},"className":"is-style-outline","fontSize":"small"} --> |
| 66 | <div class="wp-block-button has-custom-font-size is-style-outline has-small-font-size"> |
| 67 | <a class="wp-block-button__link has-contrast-color has-text-color wp-element-button" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=15" style="border-style:none;border-width:0px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 68 | <strong><?php echo esc_html( $second_title ); ?></strong> |
| 69 | </a> |
| 70 | </div> |
| 71 | <!-- /wp:button --> |
| 72 | </div> |
| 73 | <!-- /wp:buttons --> |
| 74 | </div> |
| 75 | <!-- /wp:column --> |
| 76 | |
| 77 | <!-- wp:column {"width":"25%","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":"10px"}},"layout":{"type":"default"}} --> |
| 78 | <div class="wp-block-column" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;flex-basis:25%"> |
| 79 | <!-- wp:cover {"customOverlayColor":"#c1d21c","minHeight":130,"minHeightUnit":"px","contentPosition":"top left","className":"has-background-color has-text-color","style":{"spacing":{"blockGap":"0.8em","padding":{"top":"0.8em"}}}} --> |
| 80 | <div class="wp-block-cover has-custom-content-position is-position-top-left has-background-color has-text-color" style="padding-top:0.8em;min-height:130px"> |
| 81 | <span aria-hidden="true" class="wp-block-cover__background has-background-dim-100 has-background-dim" style="background-color:#c1d21c"></span> |
| 82 | <div class="wp-block-cover__inner-container"> |
| 83 | <!-- wp:paragraph {"align":"left","placeholder":"Write title…","style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}}} --> |
| 84 | <p class="has-text-align-left has-text-color has-link-color" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=25">Under</a></p> |
| 85 | <!-- /wp:paragraph --> |
| 86 | |
| 87 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"fontSize":"large"} --> |
| 88 | <p class="has-text-color has-link-color has-large-font-size" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><strong><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=25">$25</a></strong></p> |
| 89 | <!-- /wp:paragraph --> |
| 90 | </div> |
| 91 | </div> |
| 92 | <!-- /wp:cover --> |
| 93 | |
| 94 | <!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center","verticalAlignment":"center"}} --> |
| 95 | <div class="wp-block-buttons"> |
| 96 | <!-- wp:button {"textColor":"contrast","style":{"border":{"width":"0px","style":"none"},"spacing":{"padding":{"left":"0","right":"0","top":"0","bottom":"0"}}},"className":"is-style-outline","fontSize":"small"} --> |
| 97 | <div class="wp-block-button has-custom-font-size is-style-outline has-small-font-size"> |
| 98 | <a class="wp-block-button__link has-contrast-color has-text-color wp-element-button" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=25" style="border-style:none;border-width:0px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 99 | <strong><?php echo esc_html( $third_title ); ?></strong> |
| 100 | </a> |
| 101 | </div> |
| 102 | <!-- /wp:button --> |
| 103 | </div> |
| 104 | <!-- /wp:buttons --> |
| 105 | </div> |
| 106 | <!-- /wp:column --> |
| 107 | |
| 108 | <!-- wp:column {"width":"25%","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":"10px"}},"layout":{"type":"default"}} --> |
| 109 | <div class="wp-block-column" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;flex-basis:25%"> |
| 110 | <!-- wp:cover {"customOverlayColor":"#10ca99","minHeight":130,"minHeightUnit":"px","contentPosition":"top left","className":"has-background-color has-text-color","style":{"spacing":{"blockGap":"0.8em","padding":{"top":"0.8em"}}}} --> |
| 111 | <div class="wp-block-cover has-custom-content-position is-position-top-left has-background-color has-text-color" style="padding-top:0.8em;min-height:130px"> |
| 112 | <span aria-hidden="true" class="wp-block-cover__background has-background-dim-100 has-background-dim" style="background-color:#10ca99"></span> |
| 113 | <div class="wp-block-cover__inner-container"> |
| 114 | <!-- wp:paragraph {"align":"left","placeholder":"Write title…","style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}}} --> |
| 115 | <p class="has-text-align-left has-text-color has-link-color" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=20">Under</a></p> |
| 116 | <!-- /wp:paragraph --> |
| 117 | |
| 118 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"0.7em","lineHeight":"1"},"spacing":{"margin":{"top":"0px","bottom":"5px"}},"color":{"text":"#ffffff"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"fontSize":"large"} --> |
| 119 | <p class="has-text-color has-link-color has-large-font-size" style="color:#ffffff;margin-top:0px;margin-bottom:5px;font-size:0.7em;line-height:1"><strong><a style="text-decoration:none;" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=20">$20</a></strong></p> |
| 120 | <!-- /wp:paragraph --> |
| 121 | </div> |
| 122 | </div> |
| 123 | <!-- /wp:cover --> |
| 124 | |
| 125 | <!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center","verticalAlignment":"center"}} --> |
| 126 | <div class="wp-block-buttons"> |
| 127 | <!-- wp:button {"textColor":"contrast","style":{"border":{"width":"0px","style":"none"},"spacing":{"padding":{"left":"0","right":"0","top":"0","bottom":"0"}}},"className":"is-style-outline","fontSize":"small"} --> |
| 128 | <div class="wp-block-button has-custom-font-size is-style-outline has-small-font-size"> |
| 129 | <a class="wp-block-button__link has-contrast-color has-text-color wp-element-button" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>?max_price=20" style="border-style:none;border-width:0px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 130 | <strong><?php echo esc_html( $fourth_title ); ?></strong> |
| 131 | </a> |
| 132 | </div> |
| 133 | <!-- /wp:button --> |
| 134 | </div> |
| 135 | <!-- /wp:buttons --> |
| 136 | </div> |
| 137 | <!-- /wp:column --> |
| 138 | </div> |
| 139 | <!-- /wp:columns --> |
| 140 |