Lets add text before or after the mobile menu in DIVI. By default on mobile the menu turns into a hamburger icon. This tip may be useful specially if you want to explicitly add some text next to the hamburger. I read this tip on a Elegant Themes blog few years back and have used it occasionally on my client sites.

Here’s what the default menu looks like in DIVI. I have changed the color of the hamburger menu to black in this case. Read this post, If you want to know how to change the color of the mobile menu.

Default mobile menu in DIVI

Default mobile menu in DIVI

Add Text After the Mobile Menu

Here is the css you will need to add text after the hamburger menu. Head over to your style.css in your child theme and paste the following CSS. Alternatively you can also go to DIVI -> Theme Options and paste the css in the Custom CSS box.

/* Add text after the hamburger menu in DIVI */
.mobile_menu_bar:after {
position: relative !important;
content: ‘My Menu’;
bottom: 10px;
left: 12%;
color: black;
}

This will look like the following. Change the text and color to match your website colors.

Text after mobile menu

Text after mobile menu

 

Add Text Before the Mobile Menu

You can also add the text before the hamburger menu. For that use the following CSS.

/* Add text before the hamburger menu */
#et_mobile_nav_menu:before {
content: ‘My Menu’;
position: absolute !important;
bottom: 29px;
right: 35px;
color: black;
}

Here’s the result of the CSS.

Text before mobile menu

Text before mobile menu

 

This is an easy tip to customize your DIVI site, with a few lines of CSS. I hope you liked this tip and if you do use it on your site, do leave a comment. For more such tips on WordPress and DIVI, check out my DIVI Blog.

 

13 Comments

  1. Veronica

    Thank you for this tutorial. How would one add a custom icon after the hamburger menu, instead of text?

    Reply
    • Girish Dadlani

      Hi Veronica,

      Sorry for the late reply. If you want to use one of the ET icons after the Hamburger Menu its easy to do that. Or else you can also add your own custom Icon or image. I will mention both in this reply.

      1) To add a DIVI custom icon you can first go to the following website

      https://dividezigns.com/divi-icon-codes/

      Find out the unicode for the icon you want to use. For example \e090 is the unicode for a phone icon.

      Next change the css to the following with your unicode. That should do it.

      /* Add icon after the hamburger menu in DIVI */
      .mobile_menu_bar:after {
      position: relative !important;
      font-family: ‘ETmodules’;
      content: “\e090”;
      bottom: 10px;
      left: 12%;
      color: white;
      }

      2) If you want to use your own icon that you have uploaded in your media library.
      Find out the full path – url for your own icon.

      To put a custom image in as your icon, use this as the content line (in the above css) and replace the URL with your uploaded image file:
      content: url(REPLACE_THIS_URL);

      I hope this helps. Let me know if you need any more help.

      Reply
      • Girish Dadlani

        Hi Veronica, If you like a screenshot I can email you as to how it will look. But it should be pretty straightforward if you follow the above steps.

        Reply
        • Christopher Nguyen

          Is it possible to make the icon clickable? How can i connect this extra icon to a link

          Thanks in advance!

          Reply
  2. Nanna Endersby

    Hi! Great Post! My prop down menu is more like a long bar at the moment (endersby.dk) where I’ve removed the text. Is it possible to add a logo (like your example) instead and just have the 3 lines without the box?
    Thank you!

    Reply
  3. Steve

    Thanks for posting this very useful code. It doesn’t appear to work when using the theme builder menu module. Any idea how to add the title to the menu using the menu module?

    Reply
    • Girish Dadlani

      Hi Steve
      Try this piece of code. You will have to tweak the margin and left pixels.
      .mobile_nav::before {
      content:’Menu’;
      position: absolute !important;
      margin-top: 5px;
      left: 50px;
      }

      Reply
  4. achmed

    is it also possible to make the text clickable? so even the persons clicks on the menu tekst or the burger icon it shows up the menu??

    people are clicking on the menu text 🙂

    Reply
  5. Marly Green

    Hi Girish,
    Maybe you could help… Only in Safari on mobile devices the hamburger shows as a lowercase “a” and the up-arrow in the “back to top” slider shows as a “2”.
    E.g. snmc.com, nyvc.com, florastiemer.nl etc.
    Maybe because the TLD is using HTTPS but the Divi font ETmodules is being called with unsecured HTTP. I might be wrong.
    Would you be able to suggest a solution to this? My client are unhappy with this flaw and I don’t want to ditch Divi just because of this 🙂

    Reply
    • Girish Dadlani

      Hi Marly, What version of DIVI are these sites using. I did notice the a character on nyvc site on the mobile on safari, but it went away.
      Can you flush all the cache? Also go to Divi – > Theme Options -> Builder Tab – Advanced Tab – and click on Clear (Static CSS File Generation). See if that fixes the issue.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

I would love to hear about how I can help you with your business website. I have a Masters in Computer Science from Pace University, New York. Having worked in the software industry for many years, I am now freelancing and have specialized in using the DIVI theme from Elegant Themes, since the past eight years. Do have a look at my portfolio to view my other completed projects. Feel free to contact me and I will get back to you immediately.