How to add widget area inside nav menu?
-
Hello! I’m building a Genesis child-theme, though I’m not sure that’s relevant to what I’d like to do.
I’ve got a navigation menu which includes a calendar item:
<li id="menu-item-1989" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1989"><a href="https://localhost:8888/cloudlightstudio/buddypressplayground/?page_id=80"><i class="icon-calendar"></i> Calendar</a></li>
I would love to be able to create a widget area inside this item so I can drop in a calendar list widget providing a preview of events on the calendar. Even if I can’t add a widget area, an alternative might be to call a plugin function:
<li id="menu-item-1989" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1989"><a href="https://localhost:8888/cloudlightstudio/buddypressplayground/?page_id=80"><i class="icon-calendar"></i> Calendar</a>****Widget Area Goes Here****</li>
I’ve found tutorials on how to append new items to the end of the nav menu as well as tutorials on how to add custom markup to every nav item using the ‘after’ argument, but nothing about injecting custom markup into only a single menu item. Any suggestions?
Worse comes to worse I can drop it somewhere else on the page and move it using jquery but I want to find out if it’s possible to do it the “right way” first.
- The topic ‘How to add widget area inside nav menu?’ is closed to new replies.