Menu Descrips

Support Area Forums Live Menu Descrips

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question:
  • Author
    Posts
  • #18311
    Avatar photoSRVIVR
    Participant

    Brian,

    From what I’ve read and attempted myself, it seems adding this is not as simple as one thinks it should be. Why it is not a default setting, who knows. If this is too much work and would be better fit for an update, I understand. Maybe it is where I’m putting this “walker” code, I’m not sure either. Or even if you can point me to a helpful link. Thanks.

    #18312
    Bill Robbins
    Moderator

    Jeff,

    I can honestly say I’ve never had a site or theme that used the navigation menu descriptions. But they are there to be used if you’re in a situation where they would be helpful. Sayed has a nice article at http://www.wpbeginner.com/wp-themes/how-to-add-menu-descriptions-in-your-wordpress-themes/ that might be a good place to start.

    You’d want to add the walker class to the bottom of the functions.php file. Then in the header.php file you’d want to edit this line:

    
    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => 'nav' ) ); ?>
    

    so that it looks something like this:

    
    <?php $walker = new Menu_With_Description; ?>
    				
    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => 'nav', 'walker' => $walker ) ); ?>
    

    See how that works. You’ll still have to add in styling to make it display properly and look good too.

    Hope that helps,
    Bill

    #18314
    Avatar photoSRVIVR
    Participant

    It worked… kinda. Similar to what I was seeing before, but on the left versus being right above where the normal navigation buttons were.

    #18316
    Bill Robbins
    Moderator

    You can most likely position them on either side via CSS. There won’t be anything built into the theme to support this so you’ll have to write what’s necessary in order to have them display in the right spot.

    #18328
    Avatar photoSRVIVR
    Participant

    Ok thank you so much.

    #18330
    Bill Robbins
    Moderator

    No problem Jeff. Have a great day.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Menu Descrips’ is closed to new replies.