Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1050104

    Hello everyone,

    I am trying to place a search bar within the header, see the screen shot for the mock-up of what I am trying to create/style.

    screen-shot

    So far I have;
    1. Activated header widget area in wp-content/themes/enfold/functions.php
    2. Since I am using Logo Left, Menu Below, I used the following code snippet…

    //——————————–

    // Header widget area for menu below

    //——————————–

    add_action( ‘ava_main_header’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    3. The widget text is now within the header, BUT it is above the logo, rather than centered (to the right of the logo) as shown in my mock-up.

    Could you tell me how I can style the search bar and/or widget to display as shown in my mock-up?

    Thank You!.

    #1050307

    Hey 34oldcat29,

    Could you post a link to the page in question so that we can take a closer look please?

    Best regards,
    Rikard

    #1051086

    Sorry for the late reply, I didn’t see your reply.

    Link

    Right now I have only White text in the widget so it is hidden unless you CTRL+A to see it.
    I am trying to get this widget in the center of the page (to the right of the logo).
    Any suggestions?

    Thank you!

    • This reply was modified 5 years, 10 months ago by 34oldcat29.
    #1051895

    Hi 34oldcat29,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    @media only screen and (min-width: 768px) {
      #header #text-7 {
        width: 55vw;
        float: right;
        padding: 0;
        top: 53px;
      }
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1052043

    ARG!! Now that the widet is in place I tried to add the search bar.
    I meant to add the following to header.php, but accidentally added to functions.php. Now the site shows HTTP error 500.

    <form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>/”>
    <div><input type=”text” size=”18″ value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”s” />
    <input type=”submit” id=”searchsubmit” value=”Search” class=”btn” />
    </div>
    </form>

    I have since removed this code but site still non-functional. Any suggestions?

    • This reply was modified 5 years, 10 months ago by 34oldcat29.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Search Box in Header (Widget)’ is closed to new replies.