banner.php
1 year 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
1 year ago
featured-category-cover-image.php
1 year ago
featured-category-triple.php
1 year ago
filters.php
1 year ago
footer-large.php
2 years ago
footer-simple-menu.php
2 years ago
footer-with-3-menus.php
2 years ago
four-image-grid-content-left.php
1 year ago
header-centered-pattern.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
1 year ago
hero-product-3-split.php
1 year ago
hero-product-chessboard.php
1 year ago
hero-product-split.php
1 year ago
intro-centered-content-with-image-below.php
1 year ago
just-arrived-full-hero.php
1 year ago
no-products-found-filters.php
1 year ago
no-products-found.php
2 years ago
product-collection-3-columns.php
2 years ago
product-collection-4-columns.php
1 year ago
product-collection-5-columns.php
1 year ago
product-collection-featured-products-5-columns.php
1 year ago
product-query-product-gallery.php
1 year ago
product-search-form.php
1 year ago
related-products.php
2 years ago
social-follow-us-in-social-media.php
1 year ago
testimonials-3-columns.php
1 year ago
testimonials-single.php
1 year ago
three-columns-with-images-and-content.php
1 year ago
filters.php
71 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title: Product Filters |
| 4 | * Slug: woocommerce-blocks/product-filters |
| 5 | * Categories: WooCommerce |
| 6 | * Block Types: woocommerce/active-filters, woocommerce/price-filter, woocommerce/attribute-filter, woocommerce/stock-filter |
| 7 | */ |
| 8 | |
| 9 | declare( strict_types = 1 ); |
| 10 | |
| 11 | ?> |
| 12 | |
| 13 | <!-- wp:woocommerce/filter-wrapper {"filterType":"active-filters"} --> |
| 14 | <div class="wp-block-woocommerce-filter-wrapper"><!-- wp:heading {"level":3} --> |
| 15 | <h3><?php esc_html_e( 'Active filters', 'woocommerce' ); ?></h3> |
| 16 | <!-- /wp:heading --> |
| 17 | |
| 18 | <!-- wp:woocommerce/active-filters {"heading":"","lock":{"remove":true}} --> |
| 19 | <div class="wp-block-woocommerce-active-filters is-loading" data-display-style="list" data-heading="" data-heading-level="3"><span aria-hidden="true" class="wc-block-active-filters__placeholder"></span></div> |
| 20 | <!-- /wp:woocommerce/active-filters --></div> |
| 21 | <!-- /wp:woocommerce/filter-wrapper --> |
| 22 | |
| 23 | <!-- wp:woocommerce/filter-wrapper {"filterType":"price-filter"} --> |
| 24 | <div class="wp-block-woocommerce-filter-wrapper"><!-- wp:heading {"level":3} --> |
| 25 | <h3><?php esc_html_e( 'Filter by price', 'woocommerce' ); ?></h3> |
| 26 | <!-- /wp:heading --> |
| 27 | |
| 28 | <!-- wp:woocommerce/price-filter {"heading":"","lock":{"remove":true}} --> |
| 29 | <div class="wp-block-woocommerce-price-filter is-loading" data-showinputfields="true" data-showfilterbutton="false" data-heading="" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-categories__placeholder"></span></div> |
| 30 | <!-- /wp:woocommerce/price-filter --></div> |
| 31 | <!-- /wp:woocommerce/filter-wrapper --> |
| 32 | |
| 33 | <!-- wp:woocommerce/filter-wrapper {"filterType":"stock-filter"} --> |
| 34 | <div class="wp-block-woocommerce-filter-wrapper"><!-- wp:heading {"level":3} --> |
| 35 | <h3><?php esc_html_e( 'Filter by stock status', 'woocommerce' ); ?></h3> |
| 36 | <!-- /wp:heading --> |
| 37 | |
| 38 | <!-- wp:woocommerce/stock-filter {"heading":"","lock":{"remove":true}} --> |
| 39 | <div class="wp-block-woocommerce-stock-filter is-loading" data-show-counts="true" data-heading="" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-stock-filter__placeholder"></span></div> |
| 40 | <!-- /wp:woocommerce/stock-filter --></div> |
| 41 | <!-- /wp:woocommerce/filter-wrapper --> |
| 42 | |
| 43 | <!-- wp:woocommerce/filter-wrapper {"filterType":"attribute-filter"} --> |
| 44 | <div class="wp-block-woocommerce-filter-wrapper"><!-- wp:heading {"level":3} --> |
| 45 | <h3><?php esc_html_e( 'Filter by attribute', 'woocommerce' ); ?></h3> |
| 46 | <!-- /wp:heading --> |
| 47 | |
| 48 | <?php |
| 49 | $attribute_id = 0; |
| 50 | |
| 51 | $attributes = wc_get_attribute_taxonomies(); |
| 52 | if ( ! empty( $attributes ) ) { |
| 53 | $attribute_id = reset( $attributes )->attribute_id; |
| 54 | } |
| 55 | ?> |
| 56 | |
| 57 | <!-- wp:woocommerce/attribute-filter {"attributeId":<?php echo esc_attr( $attribute_id ); ?>,"heading":"","lock":{"remove":true}} --> |
| 58 | <div class="wp-block-woocommerce-attribute-filter is-loading" data-attribute-id="<?php echo esc_attr( $attribute_id ); ?>" data-show-counts="true" data-query-type="or" data-heading="" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-attribute-filter__placeholder"></span></div> |
| 59 | <!-- /wp:woocommerce/attribute-filter --></div> |
| 60 | <!-- /wp:woocommerce/filter-wrapper --> |
| 61 | |
| 62 | <!-- wp:woocommerce/filter-wrapper {"filterType":"rating-filter"} --> |
| 63 | <div class="wp-block-woocommerce-filter-wrapper"><!-- wp:heading {"level":3} --> |
| 64 | <h3><?php esc_html_e( 'Filter by rating', 'woocommerce' ); ?></h3> |
| 65 | <!-- /wp:heading --> |
| 66 | |
| 67 | <!-- wp:woocommerce/rating-filter {"lock":{"remove":true}} --> |
| 68 | <div class="wp-block-woocommerce-rating-filter is-loading" data-show-counts="true"><span aria-hidden="true" class="wc-block-product-rating-filter__placeholder"></span></div> |
| 69 | <!-- /wp:woocommerce/rating-filter --></div> |
| 70 | <!-- /wp:woocommerce/filter-wrapper --> |
| 71 |