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

This has been answered elsewhere, but I am having a problem with the code. I'm using this:

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;

This works fine except for when I first add the item to the menu. It then adds all the content from the post in the menu description area. Is there someway to avoid that? I can just delete the content after adding it the menu (and it works fine after that), but that is not very user friendly for my clients.

share|improve this question
I have the same problem... – dingo_d Oct 3 '14 at 12:42

Your Answer


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

Browse other questions tagged or ask your own question.