I want to add a div at the bottom of the wordpress wp_nav_menu so that it looks like this:
<ul> <li>...</li> <li>...</li> <li>...</li> <div class="my-div"></div> </ul>
I can't find a way to do this in the WordPress function document, can anyone help?
Try this code:
wp_nav_menu( array( 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s <div class="my-div"></div></ul>' ) );
Just replace with below line items_wrap
items_wrap
wp_nav_menu(array( 'items_wrap' => '<ul>%3$s <div class="my-div"></div></ul>', ));
Try it:
wp_nav_menu(array('items_wrap' => '<ul>%3$s <div class="my-div"></div></ul>',));