Title: insert element in wp menu
Last modified: August 3, 2018

---

# insert element in wp menu

 *  [madebymt](https://wordpress.org/support/users/madebymt/)
 * (@madebymt)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/insert-element-in-wp-menu/)
 * Hi everyone
 * is possible to insert a custom element <div> between the wp_menu bar. I tried
   to use JQuery insertAfter method, but show up really weird.
 * example
    wp_menu list item has: HOME ABOUT BLOG RESOURCE CONTACT
 * But I need to add a **search <div>** between the resource and contact.
 * Thank you

Viewing 1 replies (of 1 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 10 months ago](https://wordpress.org/support/topic/insert-element-in-wp-menu/#post-10553425)
 * Write a function to hook wp_nav_menu_items:
 * [https://developer.wordpress.org/reference/hooks/wp_nav_menu_items/](https://developer.wordpress.org/reference/hooks/wp_nav_menu_items/)
 * Your function gets passed the menu. You go through the menu and at the right 
   place, insert your div.
 * The example on that page is pretty close to what you want to do.

Viewing 1 replies (of 1 total)

The topic ‘insert element in wp menu’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/insert-element-in-wp-menu/#post-10553425)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
