how to set the search form next to the site title in wordpress

I want to move the: next to the site title.
For now the search form is under the site title.

I just dont know how to put the “get search” inside the “echo bloginfo”.
I want the search form in the right side (after the title.)

Read More

This is the php file:

<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header2" role="banner">
    <hgroup>
        <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>
    </hgroup>

                <?php get_search_form(); ?>

    <?php if ( get_header_image() ) : ?>
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
    <?php endif; ?>
</header><!-- #masthead -->

<div id="main" class="wrapper">

Related posts

Leave a Reply

1 comment

  1. get_search_form() used to display search form you can put like below or you can also adjust with css code.

      <hgroup>
                <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>
     <?php get_search_form(); ?>
                <h2 class="site-description"><?php bloginfo( 'description' ); ?> </h2>
            </hgroup>