I am making a custom theme for my wordpress site in it the single page and home page are now displaying properly, my problem is with the search function, I have added the search form which looks like this:
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <div> <label for="searchform"></label><input class="searchinput" type="text" value="<?php if(trim(wp_specialchars($s,1))!='') echo trim(wp_specialchars($s,1));else echo ' ';?>" name="searchform" id="searchform" /> <input type="submit" class="submitinput" name="Submit" value="Search!" /> </div> </form>
I am assuming my problem is the action in the form but I don’t know what to replace it with to be able to load the search.php instead of the home.php, I tried adding /search after the blog’s url but that gives me a page not found, I also read the documentation here
but it says there that the action should be pointing to the home url so I am now lost, please help!!!
- The topic ‘Search page redirecting to home page’ is closed to new replies.