How do I add search to the header page?
-
Hello,
I’m looking at this file. When I try to add the default search, it shows up above the rest of the page. (I just added a line between the two logo and phone number <?php get_search_form(); ?> ) I’d like the search field to be directly in between my logo and my phone number. If I put it in the line next to the phone number the layout gets messed up for that. Sorry, I don’t know how to really do any editing of files other than to slap code I see on other pages there and hope it works.
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id=”content”>
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Kyma
*/?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link rel=”profile” href=”http://gmpg.org/xfn/11″>
<link rel=’shortcut icon’ href=’favicon.ico’ />
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>
<link href=”<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/css/bootstrap.min.css” rel=”stylesheet”><?php wp_head(); ?>
<!– HTML5 shiv and Respond.js IE8 support of HTML5 elements and media queries –>
<!–[if lt IE 9]>
<script src=”https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js”></script>
<script src=”https://oss.maxcdn.com/respond/1.4.2/respond.min.js”></script>
<![endif] –>
</head><body <?php body_class(); ?>>
<div id=”page” class=”site”>
<?php esc_html_e( ‘Skip to content’, ‘company’ ); ?>
<header class=”container-fluid”><!– header –>
<div class=”row”>
<div class=”col-md-6 logo”><!– logo –>
/images/csdits-logo.jpg” alt=”Company”>
</div><div class=”col-md-6 headercontact”><!– Contact Number – Telephone –>
<p><span class=”icon-phone”></span>315555551212</p>
</div>
</div>
</header><!– /. –>
<nav class=”container-fluid”><!– main menu –>
<div class=”row bgnav”>
<?php
wp_nav_menu( array(‘theme_location’ => ‘primary’,
‘container’ => ‘nav’,
‘container_class’ => ‘navbar-collapse collapse’,
‘menu_class’ => ‘nav navbar-nav’
));
?>
</div>
</nav><!– /. –>
- The topic ‘How do I add search to the header page?’ is closed to new replies.