Magento 2.3.3

I overrode the advanced search form (/vendor/magento/module-catalog-search/view/frontend/templates/advanced/form.phtml). Now I want to only search a certain category (by id) when the search button is clicked. How can I achieve that?


1 Answer 1


Copy the file




Vendor/Theme is the theme your website is using. once done you should be able to customise the form as you want.

Flush magneto cache either via the admin panel or using the CLI

bin/magento cache:flush
  • That was how to override it, but I need to know how to make it search a certain category only.
    – EOB
    Sep 9, 2020 at 8:20
  • for that you would need to extend the code to include that sort of filter Sep 9, 2020 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.