WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. lilblogger
    Member
    Posted 3 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
    Member
    Posted 3 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" />
        </div>
    </form>

    Btw, you should look the Codex.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.