Reply To: Ajax Search Pro Theme Integration

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ajax Search Pro Theme Integration Reply To: Ajax Search Pro Theme Integration

#4301

Ernest Marcinko
Keymaster

Hi!

This should do the trick:

//*ADD SEARCH TO HEADER RIGHT MENU
add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
 
function theme_menu_extras( $menu, $args ) {
 
        if ( 'header' !== $args->theme_location )
        return $menu;
     
    $menu  .= '<li class="right search">' . do_shortcode('wpdreams_ajaxsearchpro id=1') . '</li>';
     
    return $menu;
 
}
Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)