Viewing 1 replies (of 1 total)
  • You just need to add this to your header.php where you want to appear:

    <?php get_search_form(); ?>

    Unless you have a searchform.php file, wordpress is going to render this:

    <form role="search" method="get" id="searchform" action="https://example.com/">
        <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="Search" />
        </div>
    </form>

    Btw, you should look the Codex.

Viewing 1 replies (of 1 total)
  • The topic ‘How to put a search box in my header?’ is closed to new replies.