Viewing 6 replies - 1 through 6 (of 6 total)
  • Having used the snippet, the easiest way to move in CSS is:

    .navbar .nav .my-nav-menu-search {
    position: relative;
    top: 0px; /* Adjust */
    left: 0%; /* Adjust */
    }

    You’ll need to adjust the top/left with +/- px (top) and +/- % (left)

    Thread Starter KySo

    (@kyso)

    Rdellconsulting, thanks for your answer.

    Yesterday I found the following:
    https://presscustomizr.com/support-forums/topic/move-search-bar-above-menu/
    and
    https://gist.github.com/eri-trabiccolo/fd43de110434652ffbc8
    but what I get is:
    Fatal error: Call to undefined function get_product_search_form() in /home/in…/public_html/in…/wp-content/themes/customizr-child/functions.php on line 8

    What’s wrong (…or what did I do wrong)?

    Probably cut&paste error. Check carefully, but if you don’t see a problem then post the top of your functions.php (must include line #8) here.

    Thread Starter KySo

    (@kyso)

    I checked it in an other customizr theme installation and I get the same fatal error, now on line #153:
    Fatal error: Call to undefined function get_product_search_form() in /home/in…/public_html/wp-content/themes/customizr-child/functions.php on line 153

    150- add_filter(‘tc_tagline_display’, ‘add_search_form_after_tagline’);
    151- function add_search_form_after_tagline( $tagline ){
    152- global $wp_current_filter;
    153- $search_form = ‘<div class=”my-header-search span12″>’ . get_product_search_form(false) . ‘</div>’;

    //are we in the container outside?
    if ( !in_array( ‘__navbar’ , $wp_current_filter ) )
    $tagline = str_replace(‘</div>’, $search_form . ‘</div>’, $tagline);
    else
    $tagline .= $search_form;
    return $tagline;
    }

    Thanks!

    If you read the user’s request you’ll see that she was asking for the product search from hence get_product_search_form(false)
    For the default wordpress form use get_search_form(false)

    Thread Starter KySo

    (@kyso)

    Thanks for your help.
    Now everything works just fine.
    The get_product_search_form(false) is for a shopping cart?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search form above the main menu’ is closed to new replies.