Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #353397

    Hello,
    I’m trying to design the main nav menu to look like this site with the text below the link name generated by using the “Description” field in the WP menu. I had intended to do this by following the tutorial here, but it turns out that the Enfold theme ( Version 3.0.2 and WP 4.0 with a child theme ) doesn’t set up the main nav menu in the traditional way as described in the tutorial because there is no wp_nav_menu() function in this theme, so I’m at a loss how to make this happen.

    How can I get the the menu “description” text to show?

    PS I can do the styling and css, I just need to know what I have to do to get it to show up in this theme.

    Thanks…

    #353714

    Hey Riavon!

    Thank you for using Enfold.

    You can actually find the wp_nav_menu(); function on includes > helper-main -menu.php and you will see that the walker parameter is already defined. Unfortunately, it is only available for Left or Right Header. Anyway, if you want to enable it on the default header, you need to edit helper-responsive-megamenu.php. Find this code on line 239:

    if(!$this->top_menu && !empty($item->description))
    

    Replace it with:

    if(!empty($item->description))
    

    You can do this on your child theme or create a change log in case you update the theme.

    Cheers!
    Ismael

    #353726

    Ismael, thank you for your reply! I will give this solution a try later today when I can get back to this project again. Thanks again!

    #353818

    Well, I tried by saving the changed includes > helper-main -menu.php into my childtheme/includes > helper-main -menu.php, but that doesn’t work. However if I make this change in the Enfold/includes > helper-main -menu.php it works perfectly. I don’t know how to make this happen in the child theme. Apparently just changing this line and saving it into the child theme directories is not the trick. :(

    #353821

    Hi!

    You should copy the helper-responsive-megamenu.php file not the helper-main -menu.php.

    Best regards,
    Ismael

    #353833

    Oops that’s actually what I meant! I actually DID copy the helper-responsive-megamenu.php file (I typed the wrong file name in my post above). So yes I did do the correct thing as you instructed, but it doesn’t work to save it to the child theme, only works when I make the change to the Enfold file.
    ————————————————-
    SO………… I guess in conclusion then …………….. for anyone else who is looking to accomplish this same thing, Ismael’s instruction to edit line 239 of “helper-responsive-megamenu.php” as such:

    if(!$this->top_menu && !empty($item->description))
    Replace it with:
    if(!empty($item->description))

    works perfectly well, but only if you edit your Enfold theme helper-responsive-megamenu.php file. However, if you edit and save helper-responsive-megamenu.php to your child theme directory (childtheme/includes/helper-responsive-megamenu.php) it does not work. So, although it is a good solution to the problem, for which I am very thankful – sadly, it can’t be accomplished in the true way that child themes are supposed to function. So from now on, each time I update Enfold, I’ll have to ensure this code is changed so that the site main nav menu will still look and function as my client needs it to. :(

    I think I’ll head over to the Feature Requests forum and place a post asking the developers to add this ability to show the menu item descriptions as a theme functionality. It seems logical enough to me since WP enables us to use this rather neat-o functionality, then the theme should make it possible to do, rather than suppress it. (This is just my humble opinion).

    All that being said, I still remain a big fan of the Enfold theme, despite this rather small issue I have with it. I will continue to build and re-build my own and my clients’ websites with this theme. The good far outweighs the not-so-good with this theme.

    Thanks again Ismael and Enfold team!

    #355764

    Hey!

    thank you for taking the time to post a feature request. Let us know if we can assist you with another issue.

    Best regards,
    Andy

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.