Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #16163

    Hello,

    I’ve read these and other posts regarding the ability to display the menu descriptions on the frontend, but I can’t get it to work.:

    http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output

    http://www.kriesi.at/support/topic/menu-description-field-in-choices

    I’m using the Abundance theme and can add some HTML in the label field, but I know there’s a better way to get it to work in this theme (per your posts), but I don’t know what I’m missing.

    Thanks -

    #90406

    Hi lcburns,

    What steps have you taken so far? Have you added in the code to your functions from the second link there? If so, have you added in menu description text for your menus items in the Menus manager?

    Regards,

    Devin

    #90407

    Hi,

    Yes, I’ve add the code ( class description_walker extends Walker_Nav_Menu to my functions.php file. I’ve added descriptive text (they only hover).

    This code in the header just duplicates it.

    wp_nav_menu( array(

    ‘container’ =>false,

    ‘menu_class’ => ‘nav’,

    ‘echo’ => true,

    ‘before’ => ”,

    ‘after’ => ”,

    ‘link_before’ => ”,

    ‘link_after’ => ”,

    ‘depth’ => 0,

    ‘walker’ => new description_walker())

    );

    Also, when I follow these instructions, nothing happens:

    ‘Then open your header.php and find this code…

    $args = array(‘theme_location’=>’avia’, ‘fallback_cb’ => ‘avia_fallback_menu’);

    “Place this snippet on top of it.”

    $args = array(‘theme_location’=>’avia’, ‘fallback_cb’ => ‘avia_fallback_menu’, ‘walker’ =>new description_walker());

    Thanks -

    #90408

    Hi Icburns,

    Are you using the latest version of the Abundance Theme? If not, try to updating your site might help resolve the problem, just make sure to backup your customized files and data.

    Regards,

    Ismael

    #90409

    Hi,

    Yes, I’m using 1.5. It’s either adding the snippet mentioned above OR this correct?:

    wp_nav_menu( array(

    ‘container’ =>false,

    ‘menu_class’ => ‘nav’,

    ‘echo’ => true,

    ‘before’ => ”,

    ‘after’ => ”,

    ‘link_before’ => ”,

    ‘link_after’ => ”,

    ‘depth’ => 0,

    ‘walker’ => new description_walker())

    );

    Thanks -

    #90410

    Also, let me add that I’ve deactivated all plugins and there doesn’t seem to be a conflict there.

    #90411

    Hi,

    The label field doesn’t accept html , php or js. Just plain text. Write in a few words what you want to say and save and on a ‘mouse over’ event over the button, a tooltip will pop out showing the label. I just successfully was able to do that on my localhost development box with a new wordpress install,.. There are better ways to do it, I am sure of that, as there are many commercially available solutions on the market, but unfortunately I am not very familiar with them. I think the problem was caused by entry of html into the label field.,

    Thanks,

    Nick

    #90412

    Hi,

    Maybe I’m not clear, sorry for that, but it’s not the label field. I don’t have any html in the label field. I’m speaking of the description field, where you can enter just text, which I have, and it is to appear under the label on the frontend, as seen in this view:

    http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output

    Thanks -

    #90413

    Hi,

    Eh… Sorry about that, was helping someone else who was doing that, so I thought maybe it’s an epidemic.

    Now I understand what you mean, try this. You can remove those blocks, for some reason they didn’t work for me since most likely one of the last WordPress updates changed something around.

    Add this to Quick CSS in the backend and that’s it.

    .menu-item a:after { content: attr(title); }

    Just have to style it I guess, See if that works, and I will take another look at why the old method not working.

    Thanks,

    Nick

    #90414

    Hello,

    That works for the attribute/title in the menu, but what would I use for the ‘description’? I’ve tried different variations, but don’t have the right term.

    Thanks!

    #90415

    Hi,

    It looks like WordPress update changed something to cause this, since there is lot of interest in this question on Stack Exchange http://wordpress.stackexchange.com/questions/14037/menu-items-description-custom-walker-for-wp-nav-menu . Please take a look at the very last solution offered,

    I will return to test some things out,

    Thanks,

    Nick

    #90416

    Okay, thanks. Yeah, I can just put it into the attribute field, I guess. That does work.

    #90417

    Actually, it doesn’t really work when you use CSS to display:block on the attr(title), because the whole tab moves on hover.

    #90418

    Hi,

    Have you tried “to inherit all the functionalities of the parent’s start_el function and just append the description to $output:”

    function start_el(&$output, $item, $depth, $args) {
    parent::start_el($output, $item, $depth, $args);
    $output .= sprintf('<i>%s</i>', esc_html($item->description));
    }

    Thanks,

    Nick

    #90419

    Yes, I’ve added that, no luck. May just have to forgo it.

    #90420

    Hi,

    I am sorry,But this is something beyond puzzling, and must be something so simple, I am just not seeing it. I am gonna dedicate this entire weekend to solving this problem, because the only two conclusions so far I can draw is either one of the WordPress updates changed something fundamentally or Woo plugin is hijacking the Walker class further along.

    Thanks,

    Nick

    #90421

    Thanks, Nick! I do appreciate it.

Viewing 17 posts - 1 through 17 (of 17 total)

The topic ‘Menu Descriptions Not Showing on Frontend’ is closed to new replies.