changes
This commit is contained in:
@@ -25,16 +25,6 @@ class DontShowProductsOnShopLandingPageAction extends RadAction
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_all_actions('woocommerce_before_shop_loop');
|
echo site()->render("hideProductsWrapper");
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ class WooCommerceCategoryLayoutHideProducts extends RadAction
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo site()->render("hideProducts");
|
echo site()->render("hideWooCommerceWrapper");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
tpl/hideProductsWrapper.tpl
Normal file
6
tpl/hideProductsWrapper.tpl
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<style>
|
||||||
|
ul.products {
|
||||||
|
display: none;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user