Creating a searchbox (not working)
-
Hi,
I want to create a searchbox on my blog, but I can’t get it to work. More frustrating is that I don’t know what is wrong with it at the moment. Im using WordPress 2.8.4 (Dutch) with the Tidalblue theme.
I have the file searchform.php in my theme directory wit this code in it:
<form role="search" method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <div><label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Zoek" /> </div> </form>
I also made a WordPress page that includes searchform.php (I use Exec-PHP plugin for executing php in posts and pages)
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
When searching via the WordPress page or a searchwidget nothing happens except that the URL changes to https://www.url.com/?s=searchterm and the frontpage is loaded. In other words searching behaves like an anchor to my frontpage.
I have no idea what to do next to make this work, please help.
Sugar
- The topic ‘Creating a searchbox (not working)’ is closed to new replies.