minimal search form in navbar?
-
as you can see here on https://www.baserunningteam.it/ i managed to put a searchform in the navbar, using this old snippet i found on this forum.
add_filter('wp_nav_menu_items','add_search_box', 10, 2); function add_search_box($items, $args) { ob_start(); get_search_form(); $searchform = ob_get_contents(); ob_end_clean(); $items .= '<li >' . $searchform . '</li>'; return $items; }
it doesn’t look very nice, don’t you think?
– can i style it completly wit css?
– removing the button and text “search for”, or show it IN the form, as in this cool example?
– and finally, can i align the searchform on the same line of the navbar menu?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘minimal search form in navbar?’ is closed to new replies.