You can add arrow indicators to your navigation menu drop downs in your Genesis theme with just a little bit of CSS. This will help your website visitors to see at a glance which menu items have more items hidden below them. This tutorial works for all Genesis themes. If your theme already uses icons, you can change them for dashicons, if you like.
Dashicons are great for this because they are already enqueued in many Genesis themes, and because they are also used in the WordPress admin, and so it’s easy to add them to your theme. There are also three types of arrows that you can choose, so they can match most any theme style.
You can view all the dashicons here. The arrows are in the section labeled “Sorting”.
If your theme doesn’t have dashicons enqueued, or if you need more step-by-step instructions for using them, see this earlier tutorial on using dashicons. It explains how to add them to your theme.
You can add the CSS section to your Custom CSS (under Appearance > Customize > Custom CSS) or to your theme’s style.css.
If you add the CSS to your style.css, you want to be sure to add the icons to the desktop menu section of the theme. The desktop section is either in the main CSS section, before media queries or in a media query section that starts with @media only screen and (min-width: 1023px) {
, if your theme is mobile-first. You may want to adjust the min-width number to match your theme. You may also want to remove the arrows for mobile screen sizes.
Change the Arrow Size
If you want to change the size of the arrow, this is the line to edit:font: normal 16px/1 'dashicons';
Change the 16px to 18px for larger, or to 14px for smaller.
To Remove the Drop Down Arrows
To remove the dropdown arrows, for each style below, add
@media only screen and (max-width: 1023px) {
.genesis-responsive-menu .genesis-nav-menu > .menu-item-has-children > a::after {
content: '';
}
}
Arrow Style 1
This one uses “/f140” – and creates a traditional-type drop down style.
@media only screen and (min-width: 1023px) {
.genesis-nav-menu > .menu-item-has-children > a::after {
content: "\f140";
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'dashicons';
padding-left: 3px;
vertical-align: top;
}
}
Arrow Style 2
This one uses “/f346”, and creates a real arrow.
@media only screen and (min-width: 1023px) {
.genesis-nav-menu > .menu-item-has-children > a::after {
content: "\f346";
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'dashicons';
padding-left: 3px;
vertical-align: top;
}
}
Arrow Style 3
This one uses “/f347”, and creates a wider open arrow.
@media only screen and (min-width: 1023px) {
.genesis-nav-menu > .menu-item-has-children > a::after {
content: "\f347";
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'dashicons';
padding-left: 3px;
vertical-align: top;
}
}
Which arrow style will you add to your Genesis theme navigation menu drop down?
If you need help with your website menus, you can contact me for a small project.
18 responses to “How to Add Arrow Indicators to Genesis Navigation Menus”
Great post i want to add f345 for my website hope it works.
It should work well, ekant, if you follow the tutorial.
This tutorial allowed me to add my drop down arrow so quickly and easily. Thanks so much for sharing!
That’s great, Tiffany! Thanks for letting me know.
i want to add arrow to my sub items also. how to do this?
You would use CSS, like this:
Notice that the > between .genesis-nav-menu and .menu-item-has-children has been removed.
Hey Marcy, thanks for the tutorial. I added the CSS code you provided:
.genesis-nav-menu > .menu-item-has-children > a:after {
content: “\f140”;
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 ‘dashicons’;
padding-left: 3px;
vertical-align: top;
}
and it worked great.
However, there’s one problem. Now, in my responsive menu on mobile, I have two dashicons. The icon that I added with your tutorial looks good on desktop, but it’s unnecessary in my mobile menu.
Here’s the code in Media Queries section:
.genesis-nav-menu.responsive-menu > .menu-item-has-children:before {
content: “\f140”;
float: right;
font: normal 16px/1 ‘dashicons’;
height: 16px;
padding: 18px 20px;
right: 0;
text-align: right;
z-index: 9999;
}
What should I do to solve this issue? How can I hide the icon that I added with your code in my mobile menu?
I’m glad it worked out for you, Rob.
To remove the icon you added for desktop, find the media query code you pasted in your comment.
Just above it, add this:
.genesis-nav-menu > .menu-item-has-children > a:after {
content: "";
display: none;
}
Thank you, worked out again :)
How to change color on the arrow?
Thanks for stopping by, Sandra!
You would change color of arrows by adding color to:
.genesis-nav-menu > .menu-item-has-children > a:after {
color: #ff0000;
}
Thank you so much! This was so easy.
Thanks for the kind words, Jodi!
Is there way to directly add through function.php ? I would like to add fa-caret-down using font awesome icons ?
You can enqueue the Font Awesome icons in your functions.php, and then copy the CSS below each icon to use in your stylesheet.There is more help here: http://fontawesome.bootstrapcheatsheets.com/
I solved my problem with FontAwesome 5,
I added a code
font-weight: 900;
font-family: ‘Font Awesome 5 Free’;
I did same using FontAwesome 5 but couldn’t loads any icons in my website.
You can use the help documents on the FontAwesome website to learn how to use FontAwesome.