How to create same navbar for mobile same as desktop in WordPress (Divi)

How to create same navbar for mobile screens same as desktop screen? By default every WordPress site will have hamburger menu for mobiles. What if we need to disable that hamburger and view all menu items same as desktop menu. 

Step 1 – Removing hamburger menu for mobile

We need to inspect where is the css of hamburger so that we can remove it. In the example I am using website with Divi theme builder, this works for all kinds WordPress sites even without theme builder.

Open chrome and view your website in mobile size. Select hamburger and right click > select inspect you find the hamburger’s css class which is mobile_menu_bar (for every Divi website it will be the same)

open-navbar

 Now add some css in Divi theme options (this is where you can add your css)

open-navbar

Target the id header-menu and the class et_mobile_nav_menu and add this css, here we have set hamburger menu to be none to make it disappear.

#header-menu .et_mobile_nav_menu{

                                display: none!important;

                }

Step 2 – Make Menu items visible

After hiding hamburger icon, we will make all menu items visible.

So first we need to find out the container div where all menu item are contained

open-navbar

Target menu items and make them appear by giving display block property

#header-menu .et_pb_menu__menu{

                                display:block !important;

                }

Summary

Add this snippet of code in custom css field and you will see the magic and all of the stuff mentioned above is to explain how it works in css.

This is all you need to add

#header-menu .et_mobile_nav_menu{

                                display: none!important;

                }

                #header-menu .et_pb_menu__menu{

                                display:block !important;

                }

open-navbar

You will see that all menu items are appearing in mobile view as well. Now you can change menu items text size accordingly and make your menu bar look beautiful.

open-navbar
Also Read
List of best sources to learn coding

List of best sources to learn coding

List of best sources to learn codingNowadays there are many sources that provide free education, courses and beneficial knowledge. Some times It is confusing to choose the right one due to...

read more
Explore It

Tech Articles

UI/UX Design

Web Dev