• Resolved kevin heath

    (@ypraise)


    How do you disable the category selection in the search bar.

    When I search for a product without selecting the category then the search results page looks great.

    When I search for a product eg Mother’s Day and select a category such as single christian cards the page that is returned includes the home page contents before the search results and does not look good.

    As a quick solution I’m happy to just turn off the category selection.

    thanks

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kevin heath

    (@ypraise)

    I’ve done it with css as a short term measure but is there a better way?

    whoops no, that does not work as when I go into a category the category is automatically picked up in the search bar so display none does not help.

    • This reply was modified 5 years, 9 months ago by kevin heath.
    Thread Starter kevin heath

    (@ypraise)

    OK, don’t worry its fixed.

    For anyone having similar issues here’s the solution.

    set up child theme for the woocommerce > product argive file and change the:

    do_action(‘woocommerce_archive_description’);

    to:

    if (! is_search()) :
    do_action(‘woocommerce_archive_description’);
    endif;

    and that will bring back the plain results page.

    I’m guessing this is an issue only if you use category descriptions.

    • This reply was modified 5 years, 9 months ago by kevin heath.
    Theme Author AF themes

    (@afthemes)

    Hello there,
    Great to hear that you have found the way, if you have any difficulties, please feel free to come upon our direct email support from https://www.afthemes.com/supports/
    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to disable categories in search bar’ is closed to new replies.