WordPress comes with a navigation menu that makes it quite easy for beginner users. However, if you are brand new with WordPress or need a refresher, read this guide which covers the basics: how to create a menu and menu items.
1. Add custom class name to a menu item
Login to the WordPress Dashboard.
From the ‘Appearance’ menu on the left-hand side of the Dashboard, select the ‘Menus’.
Locate the menu item that you want to customize
Add custom class name to your menu item: menu_cta
If you don’t see the box to enter your custom CSS class click on “Screen Options” on the top right of your menu dashboard to enable it.
2. Add custom CSS
Snippets are below.
Does this snippet (still) work?
Please let us know in the comments if everything worked as expected. We have tested this code with the Version: 4.0.2 of the Divi Theme and Divi Friendly Hosting with PHP 7.3.
If you think this code saved you time, we will be happy to receive a comment!
License: This snippet contains code from the Divi Theme, copyright https://elegantthemes.com, modified by Divi Space, October 22, 2019. Licensed under the GNU General Public License, no warranty; click here for details.
Child themes are incredibly important for the overall look, feel, and navigation of your website, so we encourage you to take the time to get to know the content. This will help your web design and development processes tremendously. That’s why we’ve made it super easy to build a child theme for Divi or Extra in seconds!
Divi users can choose between five different methods to add custom CSS to their websites. Read more about these various methods you can use to add custom CSS to your Divi theme, as well as better understand the pros and cons of each method.