• My Account
  • Checkout
  • Contact
0 Items
Trumani Plugins & Tuts
  • Plugins
    • Divi 5 Migration Auditor
    • Gravity Forms Integration Recovery
    • Gravity Forms Robust Extras
    • WP Go Maps Divi Theme Add-on
  • Tutorials
  • Freebies
  • Integration Recovery
Select Page

Primary Menu, Secondary Menu, Fixed Menu, Logo Changes – Divi Tuts

by Trumani | Feb 9, 2018 | Divi Tuts | 4 comments

menu-and-logo-changes

In today’s tutorial, we’re making 4 changes to the primary navigation. Two apply to both Divi and Extra and two apply only to Extra.

Fixed Navigation Logo Swap (Divi and Extra)

In the theme customizer, you can stylize the fixed navigation bar to your liking with changes to the background and font colors. These colors may be different than your primary menu. What that means is your logo may no longer look good against the background color you’ve chosen. You may also want a smaller or trimmed version of your logo to display in what is often a smaller area. At this time, Divi/Extra themes don’t allow us to swap out logos. Thankfully, we can apply one of the following two code snippets.

Insert the following CSS into the Theme Options Custom CSS box (Works for Divi and Extra, but is not supported by FireFox or Edge)

[css]<br data-mce-bogus="1">
/* change logo for fixed header */
.et-fixed-header #logo {
content: url(YOUR FIXED NAV LOGO URL HERE);
}
[/css]

OR

Insert the following jQuery into the Theme Options>Integration “Add code to the < head > of your blog” field (Works for Divi and is supported by most browsers)

[code lang=”js”]
&lt;script&gt;
var imageUrl = [
‘ENTER DESKTOP LOGO IMAGE URL’,
‘ENTER FIXED HEADER LOGO IMAGE URL’,
];

jQuery(window).on(‘scroll’, function() {
var $header = jQuery(‘header’);
var $logo = jQuery(‘#logo’);

if ($header.hasClass(‘et-fixed-header’)) {
return $logo.attr(‘src’, imageUrl[1]);
};

return $logo.attr(‘src’, imageUrl[0])
});
&lt;/script&gt;
[/code]

Hide Secondary Menu Items on Mobile (Divi & Extra)

The mobile menu can get cluttered because it consolidates the primary and secondary nav into one menu. In the video, I demonstrate how you can hide specific secondary nav items from the mobile menu to keep it clean. Add something like the following to your custom css. Make sure to then add the css class to each menu item you don’t want shown on mobile.

[css]

/* Hide certain secondary nav items on mobile */
@media screen and (max-width: 1200px) {
.mobile-hide {
display: none !important;
}
}

[/css]

Style Mobile Menu Icon (Extra)

By default the mobile menu icon is white with black lines. Depending on your theme design, these colors can be jarring. Add the following css to customize the colors to your liking.

[css]

/* Mobile menu background color */
.show-menu-button {
background:#67aeca;
}
/* Mobile menu lines color */
.show-menu-button span {
background:#5f0f4e;
}

[/css]

Remove Hover & Active Menu Item Underline (Extra)

Unlike Divi, the Extra theme adds an underline when you hover over the primary menu items. I’m not a fan of this look. I guess I just hate underlines if I’m being honest. If you’re in the same boat, add the following css. The first removes it from the primary menu. The second removes it from the fixed navigation.

[css]

#et-navigation > ul > li > a::before {
background: none !important;
}
.et-fixed-header #et-navigation > ul > li > a::before {
background: none !important;
}

[/css]

 

4 Comments

  1. Cris
    Cris on June 14, 2018 at 2:38 am

    Good Day, im stuck with my secondary menu, i added 4 images and would like to style them but no luck..
    Would you be so kind as to assist or link me to the right direction?

    Log in to Reply
    • Trumani
      Trumani on June 15, 2018 at 10:46 am

      Hi Chris, may I have your referenced website url?

      Log in to Reply
  2. Andrew Barklow
    Andrew Barklow on June 21, 2018 at 1:36 pm

    With thanks! Valuable information!

    Log in to Reply
  3. airgeddon
    airgeddon on June 21, 2018 at 3:56 pm

    Your post has proven useful to me.

    Log in to Reply

Trackbacks/Pingbacks

  1. Add Widgets to Primary Menu - Divi Tuts | Trumani - […] For other great enhancements to the Divi navigation, check out this post: Primary Menu, Secondary Menu, Fixed Menu, Logo…

Submit a Comment Cancel reply

You must be logged in to post a comment.

Trumani, LLC | Love from Ohio | © 2026