I've been trying to implement a custom WP search box and I'm a bit stuck. Normally I would just use the default WP search however it just doesn't suit the website design. I'm don't really know any PHP or Javascript so I've been struggling to implement this.
I basically want it to behave as you would expect a search box to behave. (IE, enter text and press enter)
I have attached a quick mockup of the website header so you can see what I want to achieve.
This is the default WP code if it helps.
I basically want it to behave as you would expect a search box to behave. (IE, enter text and press enter)
I have attached a quick mockup of the website header so you can see what I want to achieve.
This is the default WP code if it helps.
Code:
<form action="/" method="get">
<fieldset>
<label for="search">Search in <?php echo home_url( '/' ); ?></label>
<input type="text" name="s" id="search" value="<?php the_search_query(); ?>" />
<input type="image" alt="Search" src="<?php bloginfo( 'template_url' ); ?>/images/search.png" />
</fieldset>
</form>