This code adds a search icon to your nav menu and toggles open a search form wich displays below the icon like you see in the following gif image:
There’s 3 steps to installing the code:
- Using a code editor, add the PHP code to the end of your child themes functions file.
- Add the CSS to the end of your chuld themes style.css file, before the Media Queries.
- Add the jQuery to a new file named search.js inside your child themes js folder.
Here’s the code: