Knowledge Base

Search only within the current category (or any taxonomy) archive

in Ajax Search Pro Tutorials Tags: ajax search proarchivecategoryrestrictsearchtaxonomy

Category Archive

Category Archive

There is no back-end option for this feature, but can be easily achieved by a small custom code.
To restrict the search to the current category (or taxonomy) archive page results, use the code below in the functions.php file in your active theme directory (copy from line 3 only).
Change the $taxonomy variable on line 3 according to your needs.