[resolved] How to put a search box in my header? (2 posts)

  1. lilblogger
    Posted 4 years ago #

    I'd like to put a search box in my header (to the right of my logo on http://askotherfish.com/)

    How do I do that?

  2. PaBLoX
    Posted 4 years ago #

    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="http://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" />

    Btw, you should look the Codex.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.