This commit is contained in:
2025-07-18 16:10:21 -07:00
parent 0b8865f839
commit 3364ea642b

View File

@@ -26,10 +26,10 @@ class DontShowProductsOnShopLandingPageAction extends RadAction
}
add_action('pre_get_posts', function ($query) {
if ($query->is_main_query()) {
if (!is_admin() && $query->is_main_query()) {
$query->set('post_type', 'product');
$query->set('posts_per_page', 0);
}
});
}, 20);
}
}