Support » Plugin: FiboSearch - Ajax Search for WooCommerce » Only want to show categories and not products in Search Bar

  • Resolved adi2021

    (@adi2021)


    Hi,

    On my site when I search for something, I only want to see the categories and not products.

    So while searching only categories will show.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Damian Góra

    (@damian-gora)

    Hi,

    Sure! You can do it via following filter:

    add_filter('dgwt/wcas/search_in_products', '__return_false');

    You have two ways to add this code to your theme:

    Open the functions.php in your Child Theme and add the code at the end or install the Code Snippets plugin and apply this code as a snippet.

    Thread Starter adi2021

    (@adi2021)

    Hi,
    The code snippet worked like a charm

    One more thing, can I hide the breadcrumbs in the search bar. Like if I search milk then it will show in milk > nestle

    Plugin Author Damian Góra

    (@damian-gora)

    Sure! You can hide it via simple CSS code:

    
    .dgwt-wcas-st-breadcrumbs {
      display: none!important;
    }
    
    Thread Starter adi2021

    (@adi2021)

    Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.