Filtering menu items is something that I don’t enjoy much. đŸ™‚ So I’m going to give you another idea. Instead of using extra HTML, I have a purely CSS solution. It targets the top level of your menu, and leaves the submenu alone. If you’re on the FontAwesome site, you can get unicode for the symbol you want. I grabbed the unicode for your choice.
See if this works for you. (You may have a different ID or class on your top level). You’ll probably need to adjust for spacing. I do all FontAwesome stuff on my sites this way.
ul#menu-top-navigation-menu > li > a:after {
content: "\f107";
font-family: 'FontAwesome';
font-size: 27px;
padding-left: 12px;
speak: none;
}
Related Posts:
- Menu items description? Custom Walker for wp_nav_menu()
- How to add posts to custom menus?
- wp_nav_menu(), how to change class?
- Display Menu Name using wp_nav_menu
- Add custom classes to anchor in wp_nav_menu
- How to limit wordpress menu depth in admin panel
- How do I check if a menu exists?
- How to use logout function on custom menu link?
- How to display wp_nav_menu() conditionally only when not on a 404 page?
- How to add menu support to a theme?
- Problem with registering menus – What to do when other solutions aren’t working?
- Add a #hash to the links in my custom menu
- How can i change menu link when page content empty?
- Select menu on browser resize
- Extend walker – navigation, adding data attribute to a tag
- How to add (css) classes to only one wp_nav_menu()?
- Replace Home with image link inside custom header menu
- Displaying wp menus by name without using theme locations
- How do I add a post to a menu
- how to change WordPress menu markup/classes
- Setting a Default ‘Theme Location’ When Creating a Menu
- WordPress nav_menu_css_class theme filter is not being called
- Best practices: Custom theme sidebar menu – hardcode or widget?
- How do I highlight the menu for a child page?
- Custom Nav Walker to show siblings and children of current branch?
- Where is definied the theme location for the main menu in a WordPress template?
- Second menu not showing
- How to remove class attributes from custom menu markup?
- 2 differen’t menus and it’s using same items in both
- menu behavior is not as expected
- Is there an action for save_menu and/or update_menu?
- Part of Menu Item Hidden on Header Menu
- which is the best way to customize nav-menu-template.php?
- Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]
- WordPress navbar with logo in middle [closed]
- My Admin bar covers my sticky navbar [closed]
- WordPress is adding margins and padding to my custom menu?
- Menu item added in wp_nav_menu_items filter is never highlighted
- wp_post->post_parent object returning 0
- multisite: global menu containing network site links?
- How to make theme elements customizable in wordpress?
- Using a page as home, how do I prevent nav from setting both home and page links active?
- Problem with empty class attributes when running a filter on nav_menu_css_class
- How to append to menu items selectively
- Custom Nav Walker Trouble
- Issue on Adding A Class to Bootstrap Navbar Walker Dropdown
- Show woocommerce categories on my theme menu styling
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Admin: sub menu doesnt display under apperance when activate my themes
- 3 Level Deep Navigation Menu Not Showing All Levels
- How to Create custom xml file for demo content for custom theme?
- How should I use starter content utility to show some default menus?
- How to create and populate with few links a menu in child theme functions.php?
- Second menu has the first menu ID
- How to add menĂ¹ section to my WordPress template?
- wp_nav_menu and its fallback
- Thesis -style Navigation
- Theme development – Automatically menu creation
- Theme development: How to add CSS classes to menu items?
- Navbar- disable “onClick” drop-down
- Some doubts about WordPress handle the horizontal main menu visualization
- How to conditionally add a wp_filter
- Remove/Hide a Widget on a Custom Template
- Does wordpress add their own classes into nav menus?
- Parent/Child pages
- .current_page_ancestor broken in Twenty Eleven
- finding menu hierachy > wp_get_nav_menu_items
- How to substitute old wordpress menu by wp 3 menu the right way?
- Archives and Categories in Custom Menu
- Best way to give user the option to make a menu, mega menu?
- Programatically Created Menu not Editable in Dashboard
- 3 Level Menu Navigation (3rd Level not displaying)
- Theme: dropdown hover menu not showing up in IE/Edge
- Pages not displaying as sections on static page
- How can I show a custom WordPress menu anywhere I want on my website?
- Show all menu levels except top level. How to exclude top level of a menu?
- Menu is in Reversed order
- WordPress Menu item > Sub menu Class update
- How to know and change the machine name of a menu?
- Need help with adding custom wordpress menu and sub-menu
- WordPress menu walker – Get parent item text inside end_lvl function
- How to achieve this navigation style in wordpress navigation
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- wp_nav_menu custom walker class
- Fallback dosen’t work when not using ‘menu’ attribute
- WordPress doesn’t recognize submenus as so I can’t style them properly
- Primary Menu Showing All Pages With No Sub-Nav
- How to add drop symbol to parent nav items which have child
- After theme change the menus have to be manually linked to the corresponding theme location
- WordPress 3.9 two menus in same position?
- Horizontal Navigation
- What’s the policy for building a theme that doesn’t support widgets/menus?
- Problem with multiple menus in theme
- How can I change the title of the Home link in the navigation bar?
- Header links also appearing in the footer
- How to make navigation a list without a plugin? [duplicate]
- How to highlight current menu bar base on the URL?
- Global Navigation menu in diiferrent wordpress setups
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- wp_nav_menu_items callback not triggered