<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Support Forum - Topic: Menu description field in Choices</title>
		<link>http://www.kriesi.at/support/topic/menu-description-field-in-choices</link>
		<description>Support Forum - Topic: Menu description field in Choices</description>
		<language>en-US</language>
		<pubDate>Tue, 21 May 2013 16:35:08 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/menu-description-field-in-choices" rel="self" type="application/rss+xml" />

		<item>
			<title>doublesam27 on "Menu description field in Choices"</title>
			<link>http://www.kriesi.at/support/topic/menu-description-field-in-choices#post-65467</link>
			<pubDate>Fri, 13 Jul 2012 17:45:20 +0000</pubDate>
			<dc:creator>doublesam27</dc:creator>
			<guid isPermaLink="false">65467@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Thanks a lot Ismael, that solved my issue !
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ismael on "Menu description field in Choices"</title>
			<link>http://www.kriesi.at/support/topic/menu-description-field-in-choices#post-65415</link>
			<pubDate>Fri, 13 Jul 2012 11:30:50 +0000</pubDate>
			<dc:creator>Ismael</dc:creator>
			<guid isPermaLink="false">65415@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;Copy this code at the bottom of your functions.php.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;class description_walker extends Walker_Nav_Menu
{
      function start_el(&#38;amp;$output, $item, $depth, $args)
      {
           global $wp_query;
           $indent = ( $depth ) ? str_repeat( &#38;quot;\t&#38;quot;, $depth ) : &#38;#39;&#38;#39;;

           $class_names = $value = &#38;#39;&#38;#39;;

           $classes = empty( $item-&#38;gt;classes ) ? array() : (array) $item-&#38;gt;classes;

           $class_names = join( &#38;#39; &#38;#39;, apply_filters( &#38;#39;nav_menu_css_class&#38;#39;, array_filter( $classes ), $item ) );
           $class_names = &#38;#39; class=&#38;quot;&#38;#39;. esc_attr( $class_names ) . &#38;#39;&#38;quot;&#38;#39;;

           $output .= $indent . &#38;#39;&#38;lt;li id=&#38;quot;menu-item-&#38;#39;. $item-&#38;gt;ID . &#38;#39;&#38;quot;&#38;#39; . $value . $class_names .&#38;#39;&#38;gt;&#38;#39;;

           $attributes  = ! empty( $item-&#38;gt;attr_title ) ? &#38;#39; title=&#38;quot;&#38;#39;  . esc_attr( $item-&#38;gt;attr_title ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
           $attributes .= ! empty( $item-&#38;gt;target )     ? &#38;#39; target=&#38;quot;&#38;#39; . esc_attr( $item-&#38;gt;target     ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
           $attributes .= ! empty( $item-&#38;gt;xfn )        ? &#38;#39; rel=&#38;quot;&#38;#39;    . esc_attr( $item-&#38;gt;xfn        ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
           $attributes .= ! empty( $item-&#38;gt;url )        ? &#38;#39; href=&#38;quot;&#38;#39;   . esc_attr( $item-&#38;gt;url        ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;

           $prepend = &#38;#39;&#38;lt;strong&#38;gt;&#38;#39;;
           $append = &#38;#39;&#38;lt;/strong&#38;gt;&#38;#39;;
           $description  = ! empty( $item-&#38;gt;description ) ? &#38;#39;&#38;lt;span&#38;gt;&#38;#39;.esc_attr( $item-&#38;gt;description ).&#38;#39;&#38;lt;/span&#38;gt;&#38;#39; : &#38;#39;&#38;#39;;

           if($depth != 0)
           {
                     $description = $append = $prepend = &#38;quot;&#38;quot;;
           }

            $item_output = $args-&#38;gt;before;
            $item_output .= &#38;#39;&#38;lt;a&#38;#39;. $attributes .&#38;#39;&#38;gt;&#38;#39;;
            $item_output .= $args-&#38;gt;link_before .$prepend.apply_filters( &#38;#39;the_title&#38;#39;, $item-&#38;gt;title, $item-&#38;gt;ID ).$append;
            $item_output .= $description.$args-&#38;gt;link_after;
            $item_output .= &#38;#39;&#38;lt;/a&#38;gt;&#38;#39;;
            $item_output .= $args-&#38;gt;after;

            $output .= apply_filters( &#38;#39;walker_nav_menu_start_el&#38;#39;, $item_output, $item, $depth, $args );
            }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then open your header.php and find this code&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$args = array(&#38;#39;theme_location&#38;#39;=&#38;gt;&#38;#39;avia&#38;#39;, &#38;#39;fallback_cb&#38;#39; =&#38;gt; &#38;#39;avia_fallback_menu&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Place this snippet on top of it.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$args = array(&#38;#39;theme_location&#38;#39;=&#38;gt;&#38;#39;avia&#38;#39;, &#38;#39;fallback_cb&#38;#39; =&#38;gt; &#38;#39;avia_fallback_menu&#38;#39;, &#38;#39;walker&#38;#39; =&#38;gt;new description_walker());&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;You can now add description on your menus. You may have to edit the style of your nav menus after this. &#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
Ismael
&#60;/p&#62;</description>
		</item>
		<item>
			<title>doublesam27 on "Menu description field in Choices"</title>
			<link>http://www.kriesi.at/support/topic/menu-description-field-in-choices#post-65399</link>
			<pubDate>Fri, 13 Jul 2012 09:34:50 +0000</pubDate>
			<dc:creator>doublesam27</dc:creator>
			<guid isPermaLink="false">65399@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
In your documentation of the Choices Theme,we can read that it is it possible to create subheadings for the main menu item. I managed to display the Description field in the backoffice, but I am unable to get the infomation on the front.&#60;br /&#62;
I followed your instructions here:&#60;br /&#62;
&#60;a href=&#34;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&#34; rel=&#34;nofollow&#34;&#62;http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output&#60;/a&#62;&#60;br /&#62;
But I don't know where to modify :&#60;br /&#62;
&#34;wp_nav_menu( array(&#60;br /&#62;
 'container' =&#38;gt;false,&#60;br /&#62;
 'menu_class' =&#38;gt; 'nav',&#60;br /&#62;
 'echo' =&#38;gt; true,&#60;br /&#62;
 'before' =&#38;gt; '',&#60;br /&#62;
 'after' =&#38;gt; '',&#60;br /&#62;
 'link_before' =&#38;gt; '',&#60;br /&#62;
 'link_after' =&#38;gt; '',&#60;br /&#62;
 'depth' =&#38;gt; 0,&#60;br /&#62;
 'walker' =&#38;gt; new description_walker())&#60;br /&#62;
 );&#34;&#60;br /&#62;
Is there another way to do so ? Can you please help me ?&#60;br /&#62;
Thanks and regards,
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
