Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( ! function_exists( 'videotube_add_searchform_on_menu' ) ){
- /**
- * @param unknown_type $items
- * @param unknown_type $args
- * @return string
- */
- function videotube_add_searchform_on_menu( $items, $args ) {
- if ( $args->theme_location == 'header_main_navigation' ) {
- $items .= '<li id="search-form" class="search-form menu-item">'. get_search_form(false) .'</li>';
- }
- return $items;
- }
- add_filter( 'wp_nav_menu_items', 'videotube_add_searchform_on_menu', 10, 2 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement