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
product-collections-featured-collections.php
92 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Product Collections Featured Collections |
| 4 | * Slug: woocommerce-blocks/product-collections-featured-collections |
| 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/technology-white-camera-photography-vintage-photographer.png' ); |
| 11 | $image2 = PatternsHelper::get_image_url( $images, 1, 'assets/images/pattern-placeholders/leather-guitar-typewriter-red-gadget-sofa.png' ); |
| 12 | $image3 = PatternsHelper::get_image_url( $images, 2, 'assets/images/pattern-placeholders/music-technology-play-equipment-studio-gadget.png' ); |
| 13 | $image4 = PatternsHelper::get_image_url( $images, 3, 'assets/images/pattern-placeholders/technology-joystick-gadget-console-games-playstation.png' ); |
| 14 | |
| 15 | $first_title = $content['titles'][0]['default'] ?? ''; |
| 16 | $second_title = $content['titles'][1]['default'] ?? ''; |
| 17 | $first_button = $content['buttons'][0]['default'] ?? ''; |
| 18 | $second_button = $content['buttons'][1]['default'] ?? ''; |
| 19 | ?> |
| 20 | |
| 21 | <!-- wp:columns {"align":"wide","style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"},"blockGap":{"top":"0","left":"0"}}}} --> |
| 22 | <div class="wp-block-columns alignwide" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"> |
| 23 | <!-- wp:column {"width":"50%","style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}},"color":{"background":"#f3edd8"}},"layout":{"type":"constrained"}} --> |
| 24 | <div class="wp-block-column has-background" style="background-color:#f3edd8;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;flex-basis:50%"> |
| 25 | <!-- wp:heading {"style":{"typography":{"fontStyle":"normal","fontWeight":"700"},"color":{"text":"#000000"}},"fontSize":"x-large"} --> |
| 26 | <h2 class="wp-block-heading has-text-color has-x-large-font-size" style="color:#000000;font-style:normal;font-weight:700"><?php echo esc_html( $first_title ); ?></h2> |
| 27 | <!-- /wp:heading --> |
| 28 | |
| 29 | <!-- wp:buttons --> |
| 30 | <div class="wp-block-buttons"> |
| 31 | <!-- wp:button {"style":{"spacing":{"padding":{"left":"18px","right":"18px","top":"9px","bottom":"9px"}},"typography":{"fontSize":"16px"},"color":{"background":"#000000","text":"#ffffff"}}} --> |
| 32 | <div class="wp-block-button has-custom-font-size" style="font-size:16px"> |
| 33 | <a href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>" class="wp-block-button__link has-text-color has-background wp-element-button" style="color:#ffffff;background-color:#000000;padding-top:9px;padding-right:18px;padding-bottom:9px;padding-left:18px"><?php echo esc_html( $first_button ); ?></a> |
| 34 | </div> |
| 35 | <!-- /wp:button --> |
| 36 | </div> |
| 37 | <!-- /wp:buttons --> |
| 38 | |
| 39 | <!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} --> |
| 40 | <div class="wp-block-group"> |
| 41 | <!-- wp:image {"width":140,"sizeSlug":"full","linkDestination":"none"} --> |
| 42 | <figure class="wp-block-image size-full is-resized"> |
| 43 | <img src="<?php echo esc_url( $image1 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in a left side of a banner. 1 out of 2.', 'woocommerce' ); ?>" width="140" /> |
| 44 | </figure> |
| 45 | <!-- /wp:image --> |
| 46 | |
| 47 | <!-- wp:image {"width":140,"height":100,"sizeSlug":"full","linkDestination":"none"} --> |
| 48 | <figure class="wp-block-image size-full is-resized"> |
| 49 | <img src="<?php echo esc_url( $image2 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in a left side of a banner. 2 out of 2.', 'woocommerce' ); ?>" width="140" height="100" /> |
| 50 | </figure> |
| 51 | <!-- /wp:image --> |
| 52 | </div> |
| 53 | <!-- /wp:group --> |
| 54 | </div> |
| 55 | <!-- /wp:column --> |
| 56 | |
| 57 | <!-- wp:column {"width":"50%","style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}},"color":{"background":"#d8f2f3"}}} --> |
| 58 | <div class="wp-block-column has-background" style="background-color:#d8f2f3;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;flex-basis:50%"> |
| 59 | <!-- wp:heading {"style":{"typography":{"fontStyle":"normal","fontWeight":"700"},"color":{"text":"#000000"}},"fontSize":"x-large"} --> |
| 60 | <h2 class="wp-block-heading has-text-color has-x-large-font-size" style="color:#000000;font-style:normal;font-weight:700"><?php echo esc_html( $second_title ); ?></h2> |
| 61 | <!-- /wp:heading --> |
| 62 | |
| 63 | <!-- wp:buttons --> |
| 64 | <div class="wp-block-buttons"> |
| 65 | <!-- wp:button {"style":{"spacing":{"padding":{"left":"18px","right":"18px","top":"9px","bottom":"9px"}},"typography":{"fontSize":"16px"},"color":{"background":"#000000","text":"#ffffff"}}} --> |
| 66 | <div class="wp-block-button has-custom-font-size" style="font-size:16px"> |
| 67 | <a href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>" class="wp-block-button__link has-text-color has-background wp-element-button" style="color:#ffffff;background-color:#000000;padding-top:9px;padding-right:18px;padding-bottom:9px;padding-left:18px"><?php echo esc_html( $second_button ); ?></a> |
| 68 | </div> |
| 69 | <!-- /wp:button --> |
| 70 | </div> |
| 71 | <!-- /wp:buttons --> |
| 72 | |
| 73 | <!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} --> |
| 74 | <div class="wp-block-group"> |
| 75 | <!-- wp:image {"width":140,"height":100,"sizeSlug":"full","linkDestination":"none"} --> |
| 76 | <figure class="wp-block-image size-full is-resized"> |
| 77 | <img src="<?php echo esc_url( $image3 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in a right side of a banner. 1 out of 2.', 'woocommerce' ); ?>" width="140" height="100" /> |
| 78 | </figure> |
| 79 | <!-- /wp:image --> |
| 80 | |
| 81 | <!-- wp:image {"width":140,"height":100,"sizeSlug":"full","linkDestination":"none"} --> |
| 82 | <figure class="wp-block-image size-full is-resized"> |
| 83 | <img src="<?php echo esc_url( $image4 ); ?>" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in a right side of a banner. 2 out of 2.', 'woocommerce' ); ?>" width="140" height="100" /> |
| 84 | </figure> |
| 85 | <!-- /wp:image --> |
| 86 | </div> |
| 87 | <!-- /wp:group --> |
| 88 | </div> |
| 89 | <!-- /wp:column --> |
| 90 | </div> |
| 91 | <!-- /wp:columns --> |
| 92 |