Viewing 1 replies (of 1 total)
  • Hi,

    I thought it is possible to achieve. Could you please try to add the following function into the functions.php file? You should do it in the child theme mode.

    function prefix_add_extra_menu_content($items, $args){
    
      $newitems = $items;
    
      if( $args->theme_location == 'primary' ){ // Check if menu location is primary
    
         $newitems .= $items;
         $newitems .= get_search_form(false); // Display search form
    
      }
    
      return $newitems;
    
    }
    add_filter('wp_nav_menu_items', 'prefix_add_extra_menu_content', 10, 2);

    Let me know how it goes. I’ll wait to hear back from you regarding your stats.

    Regards,
    Kharis

Viewing 1 replies (of 1 total)
  • The topic ‘Menu search area’ is closed to new replies.