Search box in menu
-
Hi.
I think updating the Twenty Twenty theme changed something in how the menu is displayed.
I have the following code added to functions.php in my child theme to add a search box to the menu:
/* Add search to menu */ 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; }
The search box used to display in the same line as my menu items, but now the search box is under the menu items. Is there anything I can do to make the search box go back to the same line as the menu items?
Thanks in advance.
- This topic was modified 2 years, 5 months ago by .
- This topic was modified 2 years, 5 months ago by . Reason: Moved to Fixing WordPress from Everything else WordPress
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Search box in menu’ is closed to new replies.