Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @joyryde!

    This is the default behavior of WordPress when the default search option is used, it’s not an issue with Neve. As you can see, the default theme Twenty Twenty also shows the products on the search results page the same as the blog posts, if the default search option is used. That page inherits the blog format. However, it’s possible to display the layout of the shop page on the search results page if you use the product search widget.

    Have a nice day!

    Thread Starter joyryde

    (@joyryde)

    How do we do that? Looks like numerous people are needing this fix.

    Thread Starter joyryde

    (@joyryde)

    For others, this is how I fixed this issue:

    Add this code to your child theme functions.php and the problem is fixed:

    function my_search_filter($query) {
        if ( $query->is_search && ! is_admin() ) {
            $query->set( 'post_type', 'product' );
            $query->is_post_type_archive = true;
        }
    }
    add_filter('pre_get_posts','my_search_filter', 9);
    • This reply was modified 3 years, 1 month ago by joyryde.

    It’s good to hear you managed to achieve the style you wanted. Thanks for sharing your solution with the community!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fix Search Results so they look like Woocommerce?’ is closed to new replies.