in a new wordpress version, the remove_filter isn’t enough, cause the desc is stripped hardcoded from post_content …
this will do the trick:
remove_filter('nav_menu_description', 'strip_tags');
add_filter( 'wp_setup_nav_menu_item', 'cus_wp_setup_nav_menu_item' );
function cus_wp_setup_nav_menu_item($menu_item) {
$menu_item->description = apply_filters( 'nav_menu_description', $menu_item->post_content );
return $menu_item;
}
Related Posts:
- Dynamically exclude menu items from wp_nav_menu
- Add custom menu item using wp_nav_menu_items filter
- Custom search filter causes menu and query_posts problems
- Unregister Nav Menu from Child-Theme
- Allow html tags in WordPress Custom Menus Description Field
- Using filters to change href of nav menu page link
- How to apply a class to the second word in menu list item?
- WordPress nav_menu_link_attributes Not Working
- Is it possible to add a filter for the output of nav-menu items in admin?
- if role is logged in then do something
- Filter menu item to add classes/attributes?
- Edit html for menu items in default frontend menu
- Set Item Order with wp_nav_menu_{$menu->slug}_items
- When at / ( or “home”) my menu doesn’t get a current-menu-item class
- How to add parent element’s title to nav menu’s child?
- Why is ‘nav_menu_item_args’ filter’s $item argument empty?
- Add class to active element and its parent in nav menu
- display only the wp_nav_menu, which has the current-menu-item
- Third level navigation class
- How to add #navbar to all page links?
- add span to top level links of a wordpress menu called “main”
- Debugging – trying to add search box to menus
- wp_list_pages() but only show children on the branch you are on
- From a page, is it possible to find entry’s “menu_item_parent”?
- Add active class to top-level menu items when viewing single for that post type
- add_filter on menu items to add a menu item
- how to disable default menu classes
- Insert other menus as submenus of a main menu
- list category posts under its item in menu
- Prevent menu from loading in a page template [duplicate]
- Insert a div before the wp_nav_menu
- How to change menu structure?
- Secondary Navigation Menudisappeared When using wp_nav_menu_items
- remove specific classes from menu items
- wp_nav_menu action/filter help
- add_filter for where statment issue
- Add a counter beside menu item label
- Add custom link on the fly to nav menu
- menu-item class missing on wordpress menu
- Filter to hook into menu items and add a custom attribute
- if role is logged in then do something
- Possible to append class to nav menu added to widget area?
- Modifying Woocommerce menu based on tags and categories
- Why does WordPress convert absolute URLs to relative URLs for menu items?
- Menu location switcher – example code fails
- Add Featured Image and Title to wp_nav_menu items
- Show thumbnail to category items in wp_nav_menu(), how?
- Add Class to Custom Menu Widget ul
- Avoid changing menu query with suppress_filters => false
- Removing menu item doesn’t get removed on edit post
- Add Protocol to Custom Menus
- How to modify menu text in callback function of ‘walker_nav_menu_start_el’ hook
- Why is WordPress stripping anchor links from mneu item URLs?
- Add button and title on submenu WordPress
- In WordPress, I want to use code to filter out one menu item (page) from displaying when I call wp_nav_menu() function
- Any docs for wp_nav_menu’s “items_wrap” argument?
- How to modify navigation menu of the “My Account” page in WooCommerce
- Link to Author archive from Navigation Menus in dashboard?
- How do I create predefined menus for my theme?
- How do I pass an argument to my custom walker?
- wp_nav_menu() not working on Custom Search Page
- Minor css-change based on topmenu – how?
- Inserting PHP before a menu element, while using the inbuilt menu function wp_nav_menu()
- Merge two separate WP menus into one in Mobile view
- Programmatically adding menu items function replicates in multiple menus
- How do i style the current menu anchor link’s parent anchor link? [closed]
- How to quickly create a dummy menu?
- wp_list_pages: only show subpages on the parent page?
- Hide Menu Unless Logged In
- HTML in Menu Items disappear on save
- How to change theme header to support multiple nav menus?
- Why do menus break on site url and folder change?
- walker – 0 level on submenu formatting
- Translate a word in a responsive menu
- current-menu-item class not working properly
- Drag and drop isn’t working while creating menu
- Add span in top menu item with nested itens
- Hide a menu on posts
- Can’t create a SubMenu
- Add (grand)child pages automatically to nav menu
- Having trouble adding CSS class through menu to link
- How to pass menu slug as a variable to wp_nav_menu?
- New Menu Item Type Meta Box
- Dynamically get the meta key value of a menu item based on it’s post ID
- Does this function wp_get_nav_menu_object check if a nav menu exists or is supported?
- Search form as list item in menu?
- Most allowed Taxonomies in Appearance->Menus
- Option to create menu is missing
- New menu is not showing in api response
- Newly created header is not visible on website
- Sub Menus will not work
- Primery Menu Configuration problem
- Menus not showing in the admin menu, after save
- menu doesn’t show in different languages
- How to make an anchored page in a navigation menu tab
- Change menu item order
- Resolve the debugs
- child theme font awesome icons not working
- trying to change color of an SVG icon (responsive Menu) in WordPress Theme “Clean Portfolio”
- There is no option to click the button in header only on some pages