Add Widget Area to custom WP menu item?
-
I hardocded a menu item to the WP menu, and rather than that menu item having a standard dropdown link, I need to have the dropdown include a widget area. I have almost everything figured out, but I’m not sure how to call the widget area within the menu item.
Here’s the code for the menu item in the functions.php file:
/* Add menu items to the PreHeader menu */ function my_menu_items($items, $args) { if( $args->theme_location == 'preheader' ){ $items .= '<li><a class="dropup-link" href="#">More</a>WIDGET AREA NEEDS TO GO HERE</li>'; $items .= '<li><a href="#">Customer Login</a></li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'my_menu_items', 10, 2 );
I need to include the widget area after the “More” link (as indicated in the note in the code above). How do I do that?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add Widget Area to custom WP menu item?’ is closed to new replies.