0

I can make wordpress custom menu,but I got a problem with this type of menu. Can anybody give me any suggestion how to make this menu dynamic?

screenshot: http://awesomescreenshot.com/0ab3d6an94

HTML markup

                    <ul id="nav">
                        <li><a href="">World News <span>From Around The Globe</span></a></li>
                        <li><a href="">Celebrity News <span>Juicy Hollywood Gossip</span></a>
                            <ul>
                                <li><a href="">Home Page</a></li>
                                <li><a href="">Blog Page</a></li>
                                <li><a href="">Full width Page</a></li>
                                <li><a href="">Archive Page</a></li>
                            </ul>
                        </li>
                        <li><a href="">Technology <span>Apps, Internet & Gadgets</span></a> </li>
                        <li><a href="">Lifestyle Tips <span>Your Health & Happiness</span></a> </li>

                     <ul>

Thanks in advance!

0

The problem is in your sub-labels below the main text in each item.

  1. When building menu, set a custom name to menu item with like this:

    World News From Around The Globe

  2. Another method is to use a megamenu WordPress plugin, which supports two labels.

| improve this answer | |
  • Thanks Alex! can you describe me more? how to set a custom name to menu item and whats the benefit of this? Actually I don't want to use plugins for menu. – Alin Aug 24 '14 at 23:23
  • I'm sorry, there is missed wrapping "<span>" in my previous answer. The idea is to keep your HTML structure, so one of the simplest methods is to wrap needed words inside your menu items with <span>'s. Go to your menu in "Appearance->Menus", and change the Navigation Label to something like on the screenshot: note.io/VNQn98 Or tell me where you stacked exactly, clarify more please. – Alex Pivtorak Aug 25 '14 at 10:59
  • I already know what you suggested me above. But I just wanted to know a better idea to make that menu.But anyway Thanks Alex! – Alin Aug 25 '14 at 18:00
  • Ok, I think this article should help you then: wpexplorer.com/adding-custom-attributes-to-wordpress-menus – Alex Pivtorak Aug 25 '14 at 22:02
0

Sorry this is not the direct answer but as a bit of help, you can read this article that Chris Coyier kindly wrote few years ago on this painful topic http://digwp.com/2011/11/html-formatting-custom-menus/

But it looks like there is no easy ways for your idea :) I guess you would want to use in these sub_labels page's meta titles? Have you tried to use "items_wrap" and "walker" parameters? As good overal reference http://codex.wordpress.org/Function_Reference/wp_nav_menu

But looks like you gonna need to ditch default wp_nav_menu function and build you own custome menu

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.