banner.php
7 months ago
coming-soon-entire-site.php
1 year ago
coming-soon-store-only.php
1 year ago
coming-soon.php
1 year ago
content-right-image-left.php
3 months ago
featured-category-cover-image.php
1 year ago
featured-category-triple.php
1 year ago
footer-large.php
1 year ago
footer-simple-menu.php
2 years ago
footer-with-3-menus.php
3 months ago
four-image-grid-content-left.php
3 months ago
header-centered-pattern.php
1 year ago
header-distraction-free.php
1 year ago
header-essential.php
1 year ago
header-large.php
1 year ago
header-minimal.php
1 year ago
heading-with-three-columns-of-content-with-link.php
3 months ago
hero-product-3-split.php
7 months ago
hero-product-chessboard.php
7 months ago
hero-product-split.php
7 months ago
intro-centered-content-with-image-below.php
3 months ago
just-arrived-full-hero.php
7 months ago
no-products-found-filters.php
1 year ago
no-products-found.php
2 years ago
page-coming-soon-default.php
1 year ago
page-coming-soon-image-gallery.php
1 year ago
page-coming-soon-minimal-left-image.php
1 year ago
page-coming-soon-modern-black.php
1 year ago
page-coming-soon-split-right-image.php
1 year ago
page-coming-soon-with-header-footer.php
3 months ago
product-collection-3-columns.php
11 months ago
product-collection-4-columns.php
11 months ago
product-collection-5-columns.php
11 months ago
product-collection-featured-products-5-columns.php
7 months ago
product-query-product-gallery.php
6 months ago
product-search-form.php
1 year ago
related-products.php
11 months ago
social-follow-us-in-social-media.php
3 months ago
testimonials-3-columns.php
1 year ago
testimonials-single.php
3 months ago
three-columns-with-images-and-content.php
3 months ago
featured-category-cover-image.php
54 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Featured Category Cover Image |
| 4 | * Slug: woocommerce-blocks/featured-category-cover-image |
| 5 | * Categories: WooCommerce, Intro |
| 6 | */ |
| 7 | |
| 8 | $image1 = plugins_url( 'assets/images/pattern-placeholders/table-wood-house-chair-floor-window.jpg', WC_PLUGIN_FILE ); |
| 9 | |
| 10 | $category_title = __( 'Sit back and relax', 'woocommerce' ); |
| 11 | $description = __( 'With a wide range of designer chairs to elevate your living space.', 'woocommerce' ); |
| 12 | $button = __( 'Shop chairs', 'woocommerce' ); |
| 13 | ?> |
| 14 | |
| 15 | <!-- wp:group {"metadata":{"name":"Featured Category Cover Image"}, "align":"full","style":{"spacing":{"padding":{"top":"calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))","bottom":"calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))","left":"var(--wp--style--root--padding-left, var(--wp--custom--gap--horizontal))","right":"var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal))"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained","justifyContent":"center"}} --> |
| 16 | <div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)));padding-right:var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal));padding-bottom:calc( 0.5 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)));padding-left:var(--wp--style--root--padding-left, var(--wp--custom--gap--horizontal))"> |
| 17 | <!-- wp:spacer {"height":"calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))"} --> |
| 18 | <div style="height:calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))" aria-hidden="true" class="wp-block-spacer"></div> |
| 19 | <!-- /wp:spacer --> |
| 20 | |
| 21 | <!-- wp:cover {"url":"<?php echo esc_url( $image1 ); ?>","dimRatio":50,"focalPoint":{"x":0.5,"y":1},"minHeight":600,"align":"full","style":{"spacing":{"padding":{"top":"3%","right":"0%","bottom":"10%","left":"5%"},"margin":{"top":"0","bottom":"0"},"blockGap":"1%"}},"layout":{"type":"default"}} --> |
| 22 | <div class="wp-block-cover alignfull" style="margin-top:0;margin-bottom:0;padding-top:3%;padding-right:0%;padding-bottom:10%;padding-left:5%;min-height:600px"> |
| 23 | <span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span> |
| 24 | <img class="wp-block-cover__image-background" alt="" src="<?php echo esc_url( $image1 ); ?>" style="object-position:50% 100%" data-object-fit="cover" data-object-position="50% 100%"/> |
| 25 | <div class="wp-block-cover__inner-container"> |
| 26 | <!-- wp:heading {"level":3} --> |
| 27 | <h3 class="wp-block-heading"><?php echo esc_html( $category_title ); ?></h3> |
| 28 | <!-- /wp:heading --> |
| 29 | |
| 30 | <!-- wp:paragraph --> |
| 31 | <p><?php echo esc_html( $description ); ?></p> |
| 32 | <!-- /wp:paragraph --> |
| 33 | |
| 34 | <!-- wp:buttons {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}}}} --> |
| 35 | <div class="wp-block-buttons" style="margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)"> |
| 36 | <!-- wp:button --> |
| 37 | <div class="wp-block-button"> |
| 38 | <a href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>" class="wp-block-button__link wp-element-button"> |
| 39 | <?php echo esc_html( $button ); ?> |
| 40 | </a> |
| 41 | </div> |
| 42 | <!-- /wp:button --> |
| 43 | </div> |
| 44 | <!-- /wp:buttons --> |
| 45 | </div> |
| 46 | </div> |
| 47 | <!-- /wp:cover --> |
| 48 | |
| 49 | <!-- wp:spacer {"height":"calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))"} --> |
| 50 | <div style="height:calc( 0.25 * var(--wp--style--root--padding-right, var(--wp--custom--gap--horizontal)))" aria-hidden="true" class="wp-block-spacer"></div> |
| 51 | <!-- /wp:spacer --> |
| 52 | </div> |
| 53 | <!-- /wp:group --> |
| 54 |