Jump to content
Sign in to follow this  
jonny41891

Menu Description

Recommended Posts

jonny41891

Hey guys, Im using the default pagelines pro theme n im wondering if its possible to use the menu description

Share this post


Link to post
Share on other sites
Guest Guest

Hmmm, perhaps a developer can address this one because I don't think this is something built in by default...

Share this post


Link to post
Share on other sites
jonny41891

like u kno the description that are just below the name of the nav/menu?

Share this post


Link to post
Share on other sites
jonny41891

Hey thanks cmunns, yea used google and found out about that but I thought there would be a more 'theme' friendly way to do this, but I will do it this way. I have two quick questions about this though, 1. If I put this in my child theme functions.php, will it get replaced when I do an update? 2. Where do I put the code in the functions.php because it looks so cluttered with different comments and I dont want to mess up my theme? thanks in advance

Share this post


Link to post
Share on other sites
bryan-hadaway

1. Yes, unless you use functions.php in PlatformBase. 2. Bottom should be fine. Thanks, Bryan

Share this post


Link to post
Share on other sites
jonny41891

Hey thanks Bryan, I'll try it out when I get back home

Share this post


Link to post
Share on other sites
klikwebdesign
I tried this and I can't get it to work. What am I missing? I followed the instructions at http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output 1) First, I checked the Description box that's under Appearance - Menus - Screen Options. 2) Second, I added the snippet I am pasting below into wp-content/themes/platformbase/functions.php. I added this at the end of the file as advised. 3) Third, I set the walker parameter in the file wp-includes/nav-menu-template.php FROM 'walker' => ' ' TO 'walker' => 'new description_walker()'. Snippet: class description_walker extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( "t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); $class_names = ' class="'. esc_attr( $class_names ) . '"'; $output .= $indent . '

Share this post


Link to post
Share on other sites
Danny
Hi klikwebdesign, Let me give this an attempt later this evening and I'll let you know if it still works or not.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
klikwebdesign
Hi Danny. Were you able to take a look at this? ... really appreciated.

Share this post


Link to post
Share on other sites
klikwebdesign
I just figured it out. It does work. Thank you.

Share this post


Link to post
Share on other sites
greggsky
I used this new walker class and modified the wp_nav_menu call in the /sections/nav/section.php file. That will be lost when upgrading my pagelines installation...is there any way of making this change in my child theme? I guess I need to read up on creating/overriding sections with child themes? Any references would be appreciated. Thanks.

Share this post


Link to post
Share on other sites
Rob
@greggsky, Could you open a new topic with this as we're unsure what PageLines' product you're using and most of this topic is PlatformPro? Thanks. We'll be happy to assist in a new topic.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×