Flatsome Show Description in Menu Item

WordPress

If you want to show the description of a menu item in flatsome you need to add the following code into your functions.php

add_filter('walker_nav_menu_start_el', 'we_show_description_in_menu', 10, 4);
function we_show_description_in_menu($item_output, $item, $depth, $args ) {

if(!isset($item->description) || empty($item->description)) {
return $item_output;
}

$item_output .= '<p class="menu-item-description">' . $item->description . '</p>';

return $item_output;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Close Popup
Privacy Settings saved!
Privacy Settings

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.

These cookies are necessary for the website to function and cannot be switched off in our systems.

Technical Cookies
In order to use this website we use the following technically required cookies
  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

Decline all Services
Save
Accept all Services