• Resolved luismaleal

    (@luismaleal)


    Is it possible that when I do a search in the bar, the drop-down list of products matching the text does not appear? My problem is that in my catalog there are many products that do not have a photo. In the store they don’t appear but in the searches they do and I don’t want them to do so.

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

Viewing 1 replies (of 1 total)
  • Plugin Support Marta

    (@martadella)

    Hi @luismaleal,

    If you hide the drop-down list, you will lose the live search benefits. Instead, I prepared a code snippet that you can use to exclude products that don’t have the featured image set:

    add_filter( 'dgwt/wcas/search_query/args', function($args) {
      $args['meta_query'][] = array(
        'key' => '_thumbnail_id',
        'compare' => 'EXISTS',
      );
      return $args;
    } );

    There are 2 ways to add the code to your website:
    1. Open the functions.php file in your child theme and add the code at the end
    2. or install the Code Snippets plugin and apply this code as a snippet

    Let us know if this works for you!

    Regards,
    Marta

Viewing 1 replies (of 1 total)
  • The topic ‘Inquiry about Fibosearch’ is closed to new replies.