diff --git a/plugins/woocommerce-blocks/patterns/featured-category-triple.php b/plugins/woocommerce-blocks/patterns/featured-category-triple.php new file mode 100644 index 00000000000..bd56d3af971 --- /dev/null +++ b/plugins/woocommerce-blocks/patterns/featured-category-triple.php @@ -0,0 +1,61 @@ +get_results( + "SELECT tt.term_id FROM {$wpdb->prefix}term_taxonomy AS tt + LEFT JOIN {$wpdb->prefix}terms AS t ON tt.term_id = t.term_id + WHERE tt.taxonomy = 'product_cat' AND tt.count > 0 AND tt.parent = 0 AND t.slug != 'uncategorized' + LIMIT 3", + ARRAY_A + ); + + set_transient( $transient_name, $categories, DAY_IN_SECONDS * 14 ); +} + +$cat1 = $categories[0]['term_id'] ? $categories[0]['term_id'] : 0; +$cat2 = $categories[1]['term_id'] ? $categories[1]['term_id'] : 0; +$cat3 = $categories[2]['term_id'] ? $categories[2]['term_id'] : 0; + +?> + +
+
'; ?> + +
+
+
+ +
+ + + +
'; ?> + +
+
+
+ +
+ + + +
'; ?> + +
+
+
+ +
+
+