I am trying to integrate the Global Site Search plugin into my theme. I use a function to add the searchform into a wp_menu.
$menu_item = '<li class="right menusearch searchposition1">' . get_search_form( false ) . '</li>';
I would like to replace get_search_form( false ) with the according call that returns the code from global-site-search-form.php (if I choose to use global site search in the customizer). I have tried to use . global_site_search_form() . and get_template_part( 'global-site-search-form':wink: ... neither returned the expected form.
Does anyone have an idea on how to get this working?
In other parts of the theme I simply use
<?php if ( get_theme_mod( 'sicher_enable_multisite_search' ) == 1 ) : ?>
<?php global_site_search_form() ?>
<?php else: ?>
<?php get_search_form(); ?>
<?php endif; ?>
But for the search form in this wp_menu the form has to be in the functions.php.
Thanks for your help