{"id":1101,"date":"2020-04-03T07:43:27","date_gmt":"2020-04-03T05:43:27","guid":{"rendered":"https:\/\/www.welaunch.io\/en\/?p=1101"},"modified":"2020-06-20T12:28:24","modified_gmt":"2020-06-20T10:28:24","slug":"flatsome-show-description-in-menu-item","status":"publish","type":"post","link":"https:\/\/www.welaunch.io\/en\/2020\/04\/flatsome-show-description-in-menu-item\/","title":{"rendered":"Flatsome Show Description in Menu Item"},"content":{"rendered":"<p>If you want to show the description of a menu item in flatsome you need to add the following code into your functions.php<\/p>\n<pre>add_filter('walker_nav_menu_start_el', 'we_show_description_in_menu', 10, 4);\r\nfunction we_show_description_in_menu($item_output, $item, $depth, $args ) {\r\n\r\nif(!isset($item-&gt;description) || empty($item-&gt;description)) {\r\nreturn $item_output;\r\n}\r\n\r\n$item_output .= '&lt;p class=\"menu-item-description\"&gt;' . $item-&gt;description . '&lt;\/p&gt;';\r\n\r\nreturn $item_output;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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(&#8216;walker_nav_menu_start_el&#8217;, &#8216;we_show_description_in_menu&#8217;, 10, 4); function we_show_description_in_menu($item_output, $item, $depth, $args ) { if(!isset($item-&gt;description) || empty($item-&gt;description)) { return $item_output; } $item_output .= &#8216;&lt;p class=&#8221;menu-item-description&#8221;&gt;&#8217; . $item-&gt;description . &#8216;&lt;\/p&gt;&#8217;; return $item_output; }<\/p>\n","protected":false},"author":1,"featured_media":2749,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/posts\/1101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=1101"}],"version-history":[{"count":1,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/posts\/1101\/revisions"}],"predecessor-version":[{"id":1102,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/posts\/1101\/revisions\/1102"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media\/2749"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=1101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/categories?post=1101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/tags?post=1101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}