This commit is contained in:
2025-07-18 16:14:49 -07:00
parent a045f2be65
commit 40be3bb1c3
4 changed files with 8 additions and 12 deletions

View File

@@ -25,16 +25,6 @@ class DontShowProductsOnShopLandingPageAction extends RadAction
return;
}
remove_all_actions('woocommerce_before_shop_loop');
remove_all_actions('woocommerce_shop_loop');
remove_all_actions('woocommerce_after_shop_loop');
remove_all_actions('woocommerce_no_products_found');
add_action('pre_get_posts', function ($query) {
if (!is_admin() && $query->is_main_query()) {
$query->set('post_type', 'product');
$query->set('posts_per_page', 0);
}
}, 99);
echo site()->render("hideProductsWrapper");
}
}

View File

@@ -25,6 +25,6 @@ class WooCommerceCategoryLayoutHideProducts extends RadAction
return;
}
echo site()->render("hideProducts");
echo site()->render("hideWooCommerceWrapper");
}
}

View File

@@ -0,0 +1,6 @@
<style>
ul.products {
display: none;
visibility: hidden;
}
</style>