• Resolved jkont

    (@jkont)


    Hi.

    I noticed that I have an issue that I didn’t have a few days ago.

    When I search with Relevanssi (I use Woodmart theme) the results are shown like blog posts.

    If I deactivate the Relevanssi plugin, then the results are shown like product search , wich is what I like ta have.

    Any ideas?

    Regards

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi doesn’t change your theme’s search results template; Relevanssi has no such power. In Woodmart, like many other WooCommerce themes, the search results template used depends on the post_type parameter. If the post_type is set to product, you’ll get the product template; otherwise, you’ll get the basic blog post template.

    So, what changes or removes the post_type parameter? Relevanssi in itself does not touch the parameter.

    Thread Starter jkont

    (@jkont)

    Hi.

    Thank you for your reply (really fast) !

    Yes, all the parameters are correct. The search type has been set to “product” , it was alway like this.

    But , only when I deactivate Relecanssi , I have the search results with the product type layout. If I enable your plugin the results will become blog type.

    Maybe a Woodmart malfunction???

    Unfortunately , my Woodmart support period has been over , so I can’t post the issue in their support forum.

    Regards

    Plugin Author Mikko Saari

    (@msaari)

    Try forcing the post type, add this to your theme functions.php or in a code snippet:

    add_filter( 'relevanssi_modify_wp_query', function( $query ) {
      $query->set( 'post_type', 'product' );
      return $query;
    } );

    Does that help?

    Thread Starter jkont

    (@jkont)

    Yes , that did it !!!

    A few days ago , the issue didn’t exist , so the snippet was not essential.

    Maybe Woodmarts last update has a compatibility issue (?) and I would prefer everything work well without the help of snippets, but you did the best.

    Anyway , I thank you VERY MUCH !!!

    What a fast reply !!!

    You have the best support I have ever seen and you absolutely deserve the 5 star rating !!!

    Best regards

    Plugin Author Mikko Saari

    (@msaari)

    It may be Woodmart, it may be something else; you can get rid of the snippet if you can figure out what it is that overrides the post_type parameter. It’s something in your site, maybe in your theme functions.php.

    Yes this helped me too. Thank you so much! Woodmart support really needs to learn from you.

    Thread Starter jkont

    (@jkont)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘When i search products, results showing like blog, not like products search..’ is closed to new replies.