Welcome to King-Theme Help Center

    Search our FAQ Before submitting your Ticket

    Can't find what you're looking for? Sign in to Submit a request to our support team.


    We are offline now.
    You still can create ticket, our supporter will reply in 24 hours.

    Our current time: 6:07 am - May 23, 2017
    Office time: 8:00 am -> 6:00 pm.

    How to add search box into menu?

    Seemtime you want to add a search box to the menu, You can add the code bellow into functions.php file then change some stylesheet to make it looks better.

     

    add_filter( 'wp_nav_menu_items','add_search_box', 10, 2 ); 
    function add_search_box( $items, $args ) { 
    $items .= '<li>' . get_search_form( false ) . '</li>'; 
    return $items; 
    }

     

    Related FAQs