changes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user