Title: add searchform.php into wp_nav_menu array
Last modified: August 20, 2016

---

# add searchform.php into wp_nav_menu array

 *  [venkmanuk](https://wordpress.org/support/users/venkmanuk/)
 * (@venkmanuk)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/add-searchformphp-into-wp_nav_menu-array/)
 * hi there,
 * i’m trying to add a search form into a menu – ideally from a template part. trouble
   is if i do this, it doesn’t pull anything in there:
 *     ```
       <?php wp_nav_menu( array(
       'theme_location' => 'primary',
       'before' => '<h3>',
       'after' => '</h3>',
   
       'items_wrap'  => '<ul id="%1$s" class="%2$s">%3$s<li class="responsiveSearch"><ul><li class="lisearch"><h3><a href="#" class="search">Search</a></h3><span><div class="box">' . get_template_part( 'element', 'searchbox' ) . '</div></span></li></ul> </li></ul>',
   
       ) ); ?>
       ```
   
 * any ideas on how can this be done?
    thanks!

The topic ‘add searchform.php into wp_nav_menu array’ is closed to new replies.

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [wp_nav_menu()](https://wordpress.org/support/topic-tag/wp_nav_menu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [venkmanuk](https://wordpress.org/support/users/venkmanuk/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/add-searchformphp-into-wp_nav_menu-array/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
