/ Published in: PHP

Place snippet in functions.php
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add_filter('wp_nav_menu_items','add_search_box', 10, 2); function add_search_box($items, $args) { get_search_form(); $items .= '<li>' . $searchform . '</li>'; return $items; }
URL: http://www.wprecipes.com/how-to-automatically-add-a-search-field-to-your-navigation-menu
Comments
