Combine two mobile menus into one in GeneratePress Theme

Do you want to combine the secondary mobile menu into primary mobile menu in GeneratePress theme? In this article I’ll share the procedure.

By default you will get two hamburger menu buttons in GeneratePress theme if you are activating the secondary menu. You will get something like this on your site (see the attached screenshot)

Two Menu Buttons

I am wanting to remove the top menu button and append the all menu items of top one into bottom menu. I create a new JS file “combine-menu.js” and save into “js” folder. This JS file is containing the following scripts:

Enqueue the above JS file with wp_enqueue_scripts hooks. Open the functions.php file of your GP child theme and add this PHP snippets

Now refresh the site and you will get one toggle menu button. Click on it and you will get secondary menu items at end of the primary menu items.

Leave a Comment





Newsletter

Get free weekly PRO Beaver Builder Tutorials

shares