• Resolved boed1

    (@boed1)


    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″&gt;
    <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&gt;
    <script src=”https://oss.maxcdn.com/respond/1.4.2/respond.min.js”></script&gt;
    <![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><!– /. –>

    • This topic was modified 4 years, 9 months ago by boed1.
    • This topic was modified 4 years, 9 months ago by boed1.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter boed1

    (@boed1)

    If I change the line to this – the appearance is exactly the way I want it but the search does not work
    <p> <span <?php get_search_form(); ?> </span> <p><span class=”icon-phone”></span>315555551212</p>
    This lets me enter text but when I click on search it doesn’t do anything.

    If I change the line to this – the search works but the formatting is off – it puts the number under the search instead of next to it <p> <?php get_search_form(); ?> <span class=”icon-phone”></span>315555551212</p>

    • This reply was modified 4 years, 9 months ago by boed1.
    Thread Starter boed1

    (@boed1)

    I finally got it working I put
    <div class=”row”>
    <div class=”col-md-6 search”><!– search –>
    <div class=”header-search-form”><?php get_search_form(); ?></div>
    </div>
    right before the <a href=tel:….

    Theme Author WebHunt Infotech

    (@webhuntinfotech)

    Good job 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I add search to the header page?’ is closed to new replies.