Ho to override searchform.php using a plugin
-
Hi All,
I am trying to build a search form that looks a bit different from the default WP search box. I can edit the searchform.php for that, but I want it to be in form of a plugin, so that I can easily enable it and disable it at will. But the problem is that if WP finds searchform.php, it will use the form in that file, so no tricks like add_filter, add_action will work here. So, what I want to ask from folks here is: does there wxist some way by which I can achieve the above. i.e override the code of searchform.php
Also on a different note, if I name the search box to anything other than “s”, then the code f=goes to index.phhp, instead of search.php. This, I have verified by putting debug echo’s and other wier statements.
What could be the possible reason for this?Thanks in advance for your help.
- The topic ‘Ho to override searchform.php using a plugin’ is closed to new replies.