I have a custom template for my homepage page with the regular search form.
The problem is that when I click on the submit button it goes for the same page (it just changes the parameters). It wasn’t supposed to call the search.php file?
I believe that even though the URL looks the same (with the addition of parameters), it does actually use the search.php as the template. So the address bar won’t actually say something like http://www.yourwebsite.com/search.php?s=bla , but http://www.yourwebsite.com/index.php?s=bla or sometimes just http://www.yourwebsite.com/?s=bla
Still, this page is built by using the search.php template.
At least, this is the case with a standard, not-too-customized WordPress installation.
Thank you, your answer helped me.
In my form I changed the text input name, that’s why I was getting the wrong template. It has to be “s”.
You must be logged in to reply to this topic.