This technique is easier and better for novices because it demands no client coding. In this technique, we will make a hamburger menu which can slide on the screen of your mobile.
An icon of a hamburger is most generally utilized as the menu icon. You will see tons of such pictures from various internet sites. We will use the menu icon from Google Material Icons library.
Now you see a picture that you want to use, save it as menu.png.
After that, you need to open a FTP customer and upload slidepanel.js file to /wp-content/your-theme/js/ folder.
If your theme catalog doesn't have the JS folder, so you have to establish tit and then upload your file.
After this process you have to upload menu.png file to /wp-content/themes/your-theme/images/ folder.
Once the files are uploaded, we need to be convinced that your theme affluence the JavaScript file you add in this moment. We will reach this by enqueuing the JavaScript file.
Append this code to your theme’s functions.php file.
Notice that your theme’s navigation menu is still there. We have just wrapped it around HTML that we need to trigger slidepanel menu.
Last step is to add CSS to hide the menu image icon on larger screens. You will also need to adjust the position of the menu icon.
Depending on your WordPress theme, you may need to adjust the CSS to avoid conflicts.
Posted by Emma Watson