I've added a search form to the main navigation menu on my site. However, on small screens when the menu changes into the hamburger menu, the search form always remains outside the collapsible menu. How can I make sure that the search form gets included in the collapsible menu? My code is below, any help would be appreciated. Thanks in advance!
I wanted to update this in case anyone else had a similar question. I was able to achieve the desired results by wrapping the wp_nav_menu in a new div giving it the class of 'collapse navbar-collapse' and an id of 'new-target'. I commented out the container_class and container_id vaules in the wp_nav_menu array. Then I changed the data-target value on the button to match the 'new-target' id which seemed to solve this issue. Updated code below.
Hello,
I've added a search form to the main navigation menu on my site. However, on small screens when the menu changes into the hamburger menu, the search form always remains outside the collapsible menu. How can I make sure that the search form gets included in the collapsible menu? My code is below, any help would be appreciated. Thanks in advance!
`
I wanted to update this in case anyone else had a similar question. I was able to achieve the desired results by wrapping the wp_nav_menu in a new div giving it the class of 'collapse navbar-collapse' and an id of 'new-target'. I commented out the container_class and container_id vaules in the wp_nav_menu array. Then I changed the data-target value on the button to match the 'new-target' id which seemed to solve this issue. Updated code below.
`
`