Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Richie KS

    (@rkcorp)

    add this to child theme functions.php or wp-content/meso-custom-functions.php, create one if do not have.

    <?php
    function meso_add_custom_searchform() {
    return get_search_form();
    }
    add_action('bp_inside_top_nav','meso_add_custom_searchform',20);
    ?>

    and add this to customizer->general->custom css

    @media only screen and (min-width:300px) and (max-width:770px){
    #top-navigation .search-form {margin: 0;width: 96%;padding: 2%;float: left;}
    }
    Thread Starter scobham

    (@scobham)

    Hi,

    Very strangely, I have just tried both of those things and neither of them worked. Any ideas why?

    Cheers

    Theme Author Richie KS

    (@rkcorp)

    where did you add the php code? if in functions.php, only add this

    function meso_add_custom_searchform() {
    return get_search_form();
    }
    add_action('bp_inside_top_nav','meso_add_custom_searchform',20);

    without php open and closing if already existed.

    Hi,

    Your code works perfectly. And how to I change the Search button form the black color to other color?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Search in Top Menu’ is closed to new replies.