This commit is contained in:
2025-07-18 16:08:19 -07:00
parent 85eed6b2d9
commit 0b8865f839

View File

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