jecn100 Posted April 18, 2015 Share Posted April 18, 2015 Sorry new to word press coding / php I have a website which has a search function in the header which searches the whole site however I want to add a search function in a category page which only searches in that category. Can i use the current search function but say if in category (directory) only show results for that category? This is what calls the current search function <?php get_search_form() ;?>could I add something in here or do I need to write a whole new search function. Help much appreciated... Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted April 18, 2015 Share Posted April 18, 2015 There are plugins made for more advanced or category searches. This one should work for you. https://wordpress.org/plugins/search-everything/ Quote Link to comment Share on other sites More sharing options...
IThinkMyBrainHurts Posted April 20, 2015 Share Posted April 20, 2015 If you look in the Codex here: https://codex.wordpress.org/Function_Reference/get_search_form and then scroll down to "Theme Form" and see the part where they add an extra hidden element to restrict the search... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.