divi how to make secondary menu inline with main menu

Divi: Making Your Secondary Menu inline with Main Menu

By Ashley Hernandez
AD

When it comes to menu layouts in Divi, a popular WordPress theme, the default settings often separate the main menu and secondary menu. However, some designs call for an inline appearance, where both menus coexist in a single row. Here's a step-by-step guide on how to achieve this, while improving your page's search engine optimization (SEO).

The default Divi menu settings may not provide this inline functionality out-of-the-box, but a small tweak in the CSS can help. Let's dive into the process, ensuring SEO best practices along the way.

Understanding Your Menu Structure

Before making any Changes, it's crucial to understand your current menu structure. Divi uses two primary menus by default - the Main Menu and the Secondary Menu. The location of these menus is defined in the theme's code.

AD
How to Include the Primary Menu Bar in Your Divi Page Design
How to Include the Primary Menu Bar in Your Divi Page Design
How to Make the Divi Active Menu Link Not Stay Blue » Divi Theme Help & Tutorials
How to Make the Divi Active Menu Link Not Stay Blue » Divi Theme Help & Tutorials
How To Add Social Media Icons to the Divi Primary Menu
How To Add Social Media Icons to the Divi Primary Menu

To make them inline, we need to adjust their positioning using custom CSS. But first, let's ensure your menus are SEO-friendly.

Ensuring Menu SEO-Friendliness

Firstly, ensure both menus are included in your website's sitemap. This helps search engines discover and index your navigation links. You can use plugins like Yoast SEO or All in One SEO to manage your sitemap.

Divi Theme 3 Fun Menu UNDERLINE Animations
Divi Theme 3 Fun Menu UNDERLINE Animations
How to create a menu with PosterMyWall - Gradient by PosterMyWall
How to create a menu with PosterMyWall - Gradient by PosterMyWall

Also, include descriptive and keyword-rich text for your menu items. Avoid using images or gibberish text as these won't help in SEO. Use clear, concise descriptions that relate to your content.

Modifying the CSS for Inline Menus

Now, onto making your menus inline. We'll add some custom CSS to your Divi theme. You can do this in the Divi > Theme Options > Custom CSS section.

AD

Add the following code, updating the menu IDs as needed:

```css #top-menu .menu-item-object-menuitem > ul > li, #sidebar-menu .menu-item-object-menuitem > ul > li { display: inline-block; float: none; } #top-menu .menu-item-object-menuitem > ul, #sidebar-menu .menu-item-object-menuitem > ul { white-space: nowrap; } ```

Third-Party Plugins for Easier Customization

While the above CSS can be applied site-wide, you might want different inline menu layouts on different pages. For this, consider using third-party plugins like the 'Divi cousins' - Divi Builder or Divi Modules.

These plugins allow you to create custom menus with drag-and-drop functionality, providing more flexibility in your design.

AD

Divi Builder

Divi Builder allows you to create new layouts from scratch, or edit existing ones. You can add your custom inline menu here and save it as a template for reuse.

Make sure to include relevant keywords in your menu items, and ensure each link leads to a relevant page on your site, improving your internal linking structure.

Divi Modules

Divi Modules is another plugin that extends Divi’s functionality by adding new modules. It includes a 'Menu' module that lets you create custom menus with ease.

AD

Again, emphasize SEO by using relevant keywords and maintaining accurate and up-to-date links in your menu items.

Now, regularly audit and update your menus to ensure they remain SEO-friendly and provide a seamless user experience. High-quality navigation leads to better user engagement and improved SEO performance.

AD