Start a project
WordPress

Flatsome Show Description in Menu Item

· by Daniel

Flatsome Show Description in Menu Item

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;
}

More articles

All articles →
WordPressMarch 22, 2022 Flatsome Change Product Columns per Category If you want to change the product columns per category or on your shop page in Flatsome, use this snippet: GeneralMarch 22, 2022 How to Globally Enable HTML for CF7 Mails If you do not want to enable “Use HTML” for every contact form 7 forms, then you can use the following code snippet: WordPressApril 16, 2021 How to block checkout in Dokan when vendor is closed Some updates ago Dokan introduces a feature for vendors to set opening and closing hours for their store. However this new functionality does nothing than showing vendors business …

Let's increase your online sales.

Tell us about your shop or website. A developer replies, not a sales team.

★ 4.85/5 from 800+ ratings · Envato Elite Author · Made in Germany