Is there a way to show just products in the results page without affecting native features like pagination.
I create next code to make a test:
function JustProductFilter($query) {
if ($query->is_search && !is:admin() ) {
$query->set(‘post_type’, ‘‘product’);
}
return $query;
}
add_filter(‘pre_get_posts’,‘JustProductFilter’);
Above code is affecting the PRO builder too, this was an unexpected behavior. Please, I know you don’t support custom code, I hope you understand im asking for your solution, not mine.