By default, WordPress removes the html tags from the description box of WP Menu items.
To enable the html tags in the description box of menu items we shall use the filter that removes the strip_tags feature from the description field of menu items.
remove_filter( 'nav_menu_description', 'strip_tags' ); add_filter( 'wp_setup_nav_menu_item', 'kd_wp_setup_nav_menu_item' ); function kd_wp_setup_nav_menu_item( $menu_item ) { $menu_item->description = apply_filters( 'nav_menu_description', $menu_item->post_content ); return $menu_item; }
Add the above filter in your functions.php and enable the html tags on the menu description of menu items .
Views: 19