Support » Theme: Twenty Twelve » [Theme: Twenty Twelve] Search field in header

Viewing 2 replies - 1 through 2 (of 2 total)
  • Drew Jaynes


    WordPress Core Developer

    Hi Rarruga,

    You could always add something like this to your header.php file:

    <div class="alignright">
    	<?php get_search_form(); ?>
    </div><!-- .alignright -->

    But you may need to finagle with the styles in the header, particularly with the site-title and site-description tags (because they extend 100% of the way across the header space.

    For example, I added the code above just below this section in header.php:

    	<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    	<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>

    And it looks sort of like this:

    Hope that helps.

    Thanks for the tip. Now I have to figure out how to implement this in my child theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Theme: Twenty Twelve] Search field in header’ is closed to new replies.