search form in header get duplicated
-
Hello,
I’ve been trying to put a search form in a header.
In order to not touch the general-template.php file, I’ve set up a searchform.php in my template as follow:
<div id="searchform"> <form method="get" action="<?php bloginfo('url'); ?>/"> <p> <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Rechercher" /> </p> </form> </div>
In my style.css, I’ve got:
[CSS moderated as per the Forum Rules. Please just post a link to your site.]
And in my header, I’m calling the search the following way:
<?php get_search_form(); ?>
It’s nearly working …
My search box gets duplicated in my header … I have no idea why !If I use Firebug and the ‘inspect element’, I can select the search box on the top. I can’t select the second one …
Any idea where the problem could come from ?
A screenshot available here
Thanks for reading
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘search form in header get duplicated’ is closed to new replies.