WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added descriptions to my menus using this post, Menu items description?. However I need to be able to use html tags and WordPress is stripping them out. Can anyone help?

share|improve this question
up vote 2 down vote accepted

You can remove the filter by adding this to your functions.php file:

remove_filter('nav_menu_description', 'strip_tags');
share|improve this answer

In new wordpress we need add some mojo:

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;
share|improve this answer
This works, but when I add new page, it will put the entire content in it. Any way to circumvent this? – dingo_d Oct 3 '14 at 10:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.