banner.php
2 years ago
coming-soon-entire-site.php
2 years ago
coming-soon-store-only.php
2 years ago
coming-soon.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
featured-products-fresh-and-tasty.php
149 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Featured Products: Fresh & Tasty |
| 4 | * Slug: woocommerce-blocks/featured-products-fresh-and-tasty |
| 5 | * Categories: WooCommerce |
| 6 | */ |
| 7 | |
| 8 | use Automattic\WooCommerce\Blocks\AIContent\PatternsHelper; |
| 9 | |
| 10 | $image1 = PatternsHelper::get_image_url( $images, 0, 'assets/images/pattern-placeholders/sweet-organic-lemons.png' ); |
| 11 | $image2 = PatternsHelper::get_image_url( $images, 1, 'assets/images/pattern-placeholders/fresh-organic-tomatoes.png' ); |
| 12 | $image3 = PatternsHelper::get_image_url( $images, 2, 'assets/images/pattern-placeholders/fresh-lettuce-washed.png' ); |
| 13 | $image4 = PatternsHelper::get_image_url( $images, 3, 'assets/images/pattern-placeholders/russet-organic-potatoes.png' ); |
| 14 | |
| 15 | $first_title = $content['titles'][0]['default'] ?? ''; |
| 16 | $first_description = $content['descriptions'][0]['default'] ?? ''; |
| 17 | $second_description = $content['descriptions'][1]['default'] ?? ''; |
| 18 | $third_description = $content['descriptions'][2]['default'] ?? ''; |
| 19 | $fourth_description = $content['descriptions'][3]['default'] ?? ''; |
| 20 | ?> |
| 21 | |
| 22 | <!-- wp:heading {"level":3,"align":"wide"} --> |
| 23 | <h3 class="wp-block-heading alignwide"><?php echo esc_html( $first_title ); ?></h3> |
| 24 | <!-- /wp:heading --> |
| 25 | |
| 26 | <!-- wp:columns {"verticalAlignment":null,"align":"wide"} --> |
| 27 | <div class="wp-block-columns alignwide"> |
| 28 | <!-- wp:column {"style":{"layout":{"type":"constrained"}} --> |
| 29 | <div class="wp-block-column"> |
| 30 | <!-- wp:image {"align":"full","scale":"cover","sizeSlug":"full","linkDestination":"none"} --> |
| 31 | <figure class="wp-block-image alignfull size-full"> |
| 32 | <img src="<?php echo esc_url( $image1 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 1 out of 4.', 'woocommerce' ); ?>" /> |
| 33 | </figure> |
| 34 | <!-- /wp:image --> |
| 35 | |
| 36 | <!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0"},"margin":{"top":"5px","bottom":"0"}}}} --> |
| 37 | <div class="wp-block-columns" style="margin-top:5px;margin-bottom:0"> |
| 38 | <!-- wp:column {"width":"67%","style":{"typography":{"fontWeight":"600"}},"layout":{"type":"constrained","justifyContent":"left"}} --> |
| 39 | <div class="wp-block-column" style="font-weight:600;flex-basis:67%"> |
| 40 | <!-- wp:paragraph {"fontSize":"small"} --> |
| 41 | <p class="has-small-font-size"><?php echo esc_html( $first_description ); ?></p> |
| 42 | <!-- /wp:paragraph --> |
| 43 | </div> |
| 44 | <!-- /wp:column --> |
| 45 | |
| 46 | <!-- wp:column {"width":"33%","layout":{"type":"constrained","justifyContent":"right"}} --> |
| 47 | <div class="wp-block-column" style="flex-basis:33%"> |
| 48 | <!-- wp:paragraph {"align":"left","fontSize":"small"} --> |
| 49 | <p class="has-text-align-left has-small-font-size"><?php esc_html_e( 'from $1.99', 'woocommerce' ); ?></p> |
| 50 | <!-- /wp:paragraph --> |
| 51 | </div> |
| 52 | <!-- /wp:column --> |
| 53 | </div> |
| 54 | <!-- /wp:columns --> |
| 55 | </div> |
| 56 | <!-- /wp:column --> |
| 57 | |
| 58 | <!-- wp:column {"style":{"layout":{"type":"constrained"}} --> |
| 59 | <div class="wp-block-column"> |
| 60 | <!-- wp:image {"align":"full","scale":"cover","sizeSlug":"full","linkDestination":"none"} --> |
| 61 | <figure class="wp-block-image alignfull size-full"> |
| 62 | <img src="<?php echo esc_url( $image2 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 2 out of 4.', 'woocommerce' ); ?>" /> |
| 63 | </figure> |
| 64 | <!-- /wp:image --> |
| 65 | |
| 66 | <!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0"},"margin":{"top":"5px","bottom":"0"}}}} --> |
| 67 | <div class="wp-block-columns" style="margin-top:5px;margin-bottom:0"> |
| 68 | <!-- wp:column {"width":"67%","style":{"typography":{"fontWeight":"600"}},"layout":{"type":"constrained","justifyContent":"left"}} --> |
| 69 | <div class="wp-block-column" style="font-weight:600;flex-basis:67%"> |
| 70 | <!-- wp:paragraph {"fontSize":"small"} --> |
| 71 | <p class="has-small-font-size"><?php echo esc_html( $second_description ); ?></p> |
| 72 | <!-- /wp:paragraph --> |
| 73 | </div> |
| 74 | <!-- /wp:column --> |
| 75 | |
| 76 | <!-- wp:column {"width":"33%","layout":{"type":"constrained","justifyContent":"right"}} --> |
| 77 | <div class="wp-block-column" style="flex-basis:33%"> |
| 78 | <!-- wp:paragraph {"align":"left","fontSize":"small"} --> |
| 79 | <p class="has-text-align-left has-small-font-size"><?php esc_html_e( 'from $2.99', 'woocommerce' ); ?></p> |
| 80 | <!-- /wp:paragraph --> |
| 81 | </div> |
| 82 | <!-- /wp:column --> |
| 83 | </div> |
| 84 | <!-- /wp:columns --> |
| 85 | </div> |
| 86 | <!-- /wp:column --> |
| 87 | |
| 88 | <!-- wp:column {"style":{"layout":{"type":"constrained"}} --> |
| 89 | <div class="wp-block-column"> |
| 90 | <!-- wp:image {"align":"full","scale":"cover","sizeSlug":"full","linkDestination":"none"} --> |
| 91 | <figure class="wp-block-image alignfull size-full"> |
| 92 | <img src="<?php echo esc_url( $image3 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 3 out of 4.', 'woocommerce' ); ?>" /> |
| 93 | </figure> |
| 94 | <!-- /wp:image --> |
| 95 | |
| 96 | <!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0"},"margin":{"top":"5px","bottom":"0"}}}} --> |
| 97 | <div class="wp-block-columns" style="margin-top:5px;margin-bottom:0"> |
| 98 | <!-- wp:column {"width":"67%","style":{"typography":{"fontWeight":"600"}},"layout":{"type":"constrained","justifyContent":"left"}} --> |
| 99 | <div class="wp-block-column" style="font-weight:600;flex-basis:67%"> |
| 100 | <!-- wp:paragraph {"fontSize":"small"} --> |
| 101 | <p class="has-small-font-size"><?php echo esc_html( $third_description ); ?></p> |
| 102 | <!-- /wp:paragraph --> |
| 103 | </div> |
| 104 | <!-- /wp:column --> |
| 105 | |
| 106 | <!-- wp:column {"width":"33%","layout":{"type":"constrained","justifyContent":"right"}} --> |
| 107 | <div class="wp-block-column" style="flex-basis:33%"> |
| 108 | <!-- wp:paragraph {"align":"left","fontSize":"small"} --> |
| 109 | <p class="has-text-align-left has-small-font-size"><?php esc_html_e( 'from $0.99', 'woocommerce' ); ?></p> |
| 110 | <!-- /wp:paragraph --> |
| 111 | </div> |
| 112 | <!-- /wp:column --> |
| 113 | </div> |
| 114 | <!-- /wp:columns --> |
| 115 | </div> |
| 116 | <!-- /wp:column --> |
| 117 | |
| 118 | <!-- wp:column {"style":{"layout":{"type":"constrained"}} --> |
| 119 | <div class="wp-block-column"> |
| 120 | <!-- wp:image {"align":"full","scale":"cover","sizeSlug":"full","linkDestination":"none"} --> |
| 121 | <figure class="wp-block-image alignfull size-full"> |
| 122 | <img src="<?php echo esc_url( $image4 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 4 out of 4.', 'woocommerce' ); ?>" /> |
| 123 | </figure> |
| 124 | <!-- /wp:image --> |
| 125 | |
| 126 | <!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0"},"margin":{"top":"5px","bottom":"0"}}}} --> |
| 127 | <div class="wp-block-columns" style="margin-top:5px;margin-bottom:0"> |
| 128 | <!-- wp:column {"width":"67%","style":{"typography":{"fontWeight":"600"}},"layout":{"type":"constrained","justifyContent":"left"}} --> |
| 129 | <div class="wp-block-column" style="font-weight:600;flex-basis:67%"> |
| 130 | <!-- wp:paragraph {"fontSize":"small"} --> |
| 131 | <p class="has-small-font-size"><?php echo esc_html( $fourth_description ); ?></p> |
| 132 | <!-- /wp:paragraph --> |
| 133 | </div> |
| 134 | <!-- /wp:column --> |
| 135 | |
| 136 | <!-- wp:column {"width":"33%","layout":{"type":"constrained","justifyContent":"right"}} --> |
| 137 | <div class="wp-block-column" style="flex-basis:33%"> |
| 138 | <!-- wp:paragraph {"align":"left","fontSize":"small"} --> |
| 139 | <p class="has-text-align-left has-small-font-size"><?php esc_html_e( 'from $1.49', 'woocommerce' ); ?></p> |
| 140 | <!-- /wp:paragraph --> |
| 141 | </div> |
| 142 | <!-- /wp:column --> |
| 143 | </div> |
| 144 | <!-- /wp:columns --> |
| 145 | </div> |
| 146 | <!-- /wp:column --> |
| 147 | </div> |
| 148 | <!-- /wp:columns --> |
| 149 |