Title: shortcode in menu description
Last modified: September 1, 2016

---

# shortcode in menu description

 *  Resolved [IT Hertz](https://wordpress.org/support/users/it-hertz/)
 * (@it-hertz)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/shortcode-in-menu-description/)
 * It works fine as a nav menu item, but it would be great if it could work in an
   existing item’s Description area.
 * What I’m trying to do is place a news ticker in a menu item’s Description area
   using Horizontal Scrolling Announcement plugin.
    When I place the scrolling shortcode
   in the Description box, it calls the plugin, but it shows as “No announcement
   available”. So, for now, I have to add the ticker as a separate menu item, which
   doesn’t look right, because the theme/look I have inserts horizontal line separators
   between each item in the vertical menu/navbar.
 * Can you tell me what to change in this plugin’s index.php file to provide this
   functionality, or would it require more extensive modification of the theme (
   KingSize) files as well? If you can point me in the right direction, I’m sure
   I can do those mods as well.
 * Thanks.
 * [https://wordpress.org/plugins/shortcode-in-menus/](https://wordpress.org/plugins/shortcode-in-menus/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [IT Hertz](https://wordpress.org/support/users/it-hertz/)
 * (@it-hertz)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/shortcode-in-menu-description/#post-7665487)
 * I tried to do this via CSS and simply remove the item separator line from above
   the shortcode and then negative margin the ticker up to where the item description
   normally resides, but that didn’t go well.
 * I then tried using this plugin’s `function has_shortcode( $content ) {` and inserted
   the `$item_output = do_shortcode( $item->description );` into my theme’s menu-
   walker.php, but no joy. 8-/
 *  Thread Starter [IT Hertz](https://wordpress.org/support/users/it-hertz/)
 * (@it-hertz)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/shortcode-in-menu-description/#post-7665564)
 * Ok, I managed to get the ticker in the Description space by inserting the following
   above the similar `<h6>` line in menu-walker.php: `$description = ! empty( $item
   >description ) ? '<div class="desc menuticker '.$selc.'">'.do_shortcode( $item-
   >description ).'</div>' : '';`
    and then commenting out the original line.
 * With a little CSS magic, some div work and the `has_shortcode` function, it shouldn’t
   be too difficult to have a customized menu description and/or shortcode ticker
   in the description area and make it clickable or not.
 *  Thread Starter [IT Hertz](https://wordpress.org/support/users/it-hertz/)
 * (@it-hertz)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/shortcode-in-menu-description/#post-7665587)
 * I ended up just doing it with CSS alone to eliminate the separator border between
   the shortcode item and the item above it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘shortcode in menu description’ is closed to new replies.

 * ![](https://ps.w.org/shortcode-in-menus/assets/icon-128x128.png?rev=1016813)
 * [Shortcode in Menus](https://wordpress.org/plugins/shortcode-in-menus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcode-in-menus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-in-menus/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-in-menus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-in-menus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/)

 * 3 replies
 * 1 participant
 * Last reply from: [IT Hertz](https://wordpress.org/support/users/it-hertz/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/shortcode-in-menu-description/#post-7665587)
 * Status: resolved