Support » Fixing WordPress » add searchform.php 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?

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