• Hello,

    I ‘ve been trying to get the search bar in the navbar for some time .
    But unfortunately I do not get ahead .

    http://www.aviation-company.de

    I’ve added a new widget and do not know how to get it into the search bar .

    Maybe someone can give you of an important hint .

    Here the code in the functions.php

    // Adds a widget area to house a Polylang dropdown. See also accompanying css.
    if (function_exists('register_sidebar')) {
     register_sidebar(array(
     'name' => 'Extra Widget After Navbar',
     'id' => 'extra-widget',
     'description' => 'Extra widget after the navbar',
     'before_widget' => '<div class="widget %2$s" id="%1$s">',
     'after_widget' => '</div>',
     'before_title' => '<h2>',
     'after_title' => '</h2>'
     ));
    }
    
    // Place the widget area after the navbar
    add_filter ('__navbar', 'add_my_widget');
    function add_my_widget() {
     if (function_exists('dynamic_sidebar')) {
     dynamic_sidebar('Extra Widget After Navbar');
     }
    }

    And here in the style.css

    /*Produktsearch,JB*/
    .widget_products_predictive_search{
    
    	float: right;
        width: 20%;
        position: relative;
        bottom: -5px;
        }

    Thank you for your help.

    best regards

    Johannes

The topic ‘Search Widget in Navbar’ is closed to new replies.