Hi guys-
I’d like to use the little popup that is now the search function, to instead contain a simple login form. One that I can control to web integration of, like Gravity Forms. How would I go about that?
Thanks…
I can not tell you how to integrate the login form itself – the code depends on your application. However the search form code can be found in functions-enfold.php
/* AJAX SEARCH */
if(!function_exists('avia_append_search_nav'))
{
//first append search item to main menu
add_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 );
function avia_append_search_nav ( $items, $args )
{
if ($args->theme_location == 'avia')
{
global $avia_config;
ob_start();
get_search_form();
$form = htmlspecialchars(ob_get_clean()) ;
$items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown"><a href="?s=" data-avia-search-tooltip="'.$form.'">'.$avia_config['font_icons']['search'].'</a></li>';
}
return $items;
}
}
The first code block:
ob_start();
get_search_form();
$form = htmlspecialchars(ob_get_clean()) ;
generates the form and stores it into the $form variable, the second code block
$items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown"><a href="?s=" data-avia-search-tooltip="'.$form.'">'.$avia_config['font_icons']['search'].'</a></li>';
adds the search icon ($avia_config) to the main menu and adds the $form variable to the tooltip content.