esc_html__( 'Search', 'Avada' ), 'id' => 'heading_search', 'priority' => 23, 'icon' => 'el-icon-search', 'alt_icon' => 'fusiona-search', 'fields' => [ 'search_form_options_section' => [ 'label' => esc_html__( 'Search Form', 'Avada' ), 'description' => '', 'id' => 'search_form_options_section', 'icon' => true, 'type' => 'sub-section', 'fields' => [ 'search_filter_results' => [ 'label' => esc_html__( 'Limit Search Results Post Types', 'Avada' ), 'description' => esc_html__( 'Turn on to limit the search results to specific post types you can choose.', 'Avada' ), 'id' => 'search_filter_results', 'default' => '0', 'type' => 'switch', 'update_callback' => [ [ 'condition' => 'is_search', 'operator' => '===', 'value' => true, ], ], ], 'search_content' => [ 'label' => esc_html__( 'Search Results Content', 'Avada' ), 'description' => esc_html__( 'Controls the type of content that displays in search results.', 'Avada' ), 'id' => 'search_content', 'default' => [ 'post', 'page', 'avada_portfolio', 'avada_faq' ], 'type' => 'select', 'multi' => true, 'choices' => [ 'post' => esc_html__( 'Posts', 'Avada' ), 'page' => esc_html__( 'Pages', 'Avada' ), 'avada_portfolio' => esc_html__( 'Portfolio Items', 'Avada' ), 'avada_faq' => esc_html__( 'FAQ Items', 'Avada' ), 'product' => esc_html__( 'WooCommerce Products', 'Avada' ), 'tribe_events' => esc_html__( 'Events Calendar Posts', 'Avada' ), ], 'required' => [ [ 'setting' => 'search_filter_results', 'operator' => '=', 'value' => '1', ], ], 'update_callback' => [ [ 'condition' => 'is_search', 'operator' => '===', 'value' => true, ], ], ], 'search_limit_to_post_titles' => [ 'label' => esc_html__( 'Limit Search to Post Titles', 'Avada' ), 'description' => esc_html__( 'Turn on to limit the search to post titles only.', 'Avada' ), 'id' => 'search_limit_to_post_titles', 'default' => '0', 'type' => 'switch', 'update_callback' => [ [ 'condition' => 'is_search', 'operator' => '===', 'value' => true, ], ], ], 'search_form_design' => [ 'label' => esc_html__( 'Search Form Design', 'Avada' ), 'description' => esc_html__( 'Controls the design of the search forms.', 'Avada' ), 'id' => 'search_form_design', 'default' => 'clean', 'type' => 'radio-buttonset', 'choices' => [ 'classic' => esc_html__( 'Classic', 'Avada' ), 'clean' => esc_html__( 'Clean', 'Avada' ), ], 'output' => [ // Change classes in
. [ 'element' => 'body', 'function' => 'attr', 'attr' => 'class', 'value_pattern' => 'fusion-search-form-$', 'remove_attrs' => [ 'fusion-search-form-classic', 'fusion-search-form-clean' ], ], ], ], 'live_search' => [ 'label' => esc_html__( 'Enable Live Search', 'Avada' ), 'description' => esc_html__( 'Turn on to enable live search results on menu search field and other fitting search forms.', 'Avada' ), 'id' => 'live_search', 'default' => '0', 'type' => 'switch', // Partial refresh for the searchform. 'partial_refresh' => [ 'searchform_live_search' => [ 'selector' => '.searchform.fusion-search-form', 'container_inclusive' => true, 'render_callback' => [ 'Avada_Partial_Refresh_Callbacks', 'searchform' ], 'success_trigger_event' => 'avadaLiveSearch', ], ], // This is for the avadaLiveSearchVars.live_search var. [ 'element' => 'helperElement', 'property' => 'bottom', 'js_callback' => [ 'fusionGlobalScriptSet', [ 'globalVar' => 'avadaLiveSearchVars', 'id' => 'live_search', 'trigger' => [ 'avadaLiveSearch' ], ], ], 'sanitize_callback' => '__return_empty_string', ], ], 'live_search_min_char_count' => [ 'label' => esc_html__( 'Live Search Minimal Character Count', 'Avada' ), 'description' => esc_html__( 'Set the minimal character count to trigger the live search.', 'Avada' ), 'id' => 'live_search_min_char_count', 'default' => '4', 'type' => 'slider', 'choices' => [ 'min' => '1', 'max' => '20', 'step' => '1', ], 'required' => [ [ 'setting' => 'live_search', 'operator' => '=', 'value' => '1', ], ], // Partial refresh for the searchform. 'partial_refresh' => [ 'searchform_live_search_min_char_count' => [ 'selector' => '.searchform.fusion-search-form', 'container_inclusive' => true, 'render_callback' => [ 'Avada_Partial_Refresh_Callbacks', 'searchform' ], 'success_trigger_event' => 'avadaLiveSearch', ], ], // JS var: avadaLiveSearchVars.min_char_count. [ 'element' => 'helperElement', 'property' => 'bottom', 'js_callback' => [ 'fusionGlobalScriptSet', [ 'globalVar' => 'avadaLiveSearchVars', 'id' => 'min_char_count', 'trigger' => [ 'avadaLiveSearch' ], ], ], 'sanitize_callback' => '__return_empty_string', ], ], 'live_search_results_per_page' => [ 'label' => esc_html__( 'Live Search Number of Posts', 'Avada' ), 'description' => esc_html__( 'Controls the number of posts that should be displayed as search result suggestions.', 'Avada' ), 'id' => 'live_search_results_per_page', 'default' => '100', 'type' => 'slider', 'choices' => [ 'min' => '10', 'max' => '500', 'step' => '10', ], 'required' => [ [ 'setting' => 'live_search', 'operator' => '=', 'value' => '1', ], ], 'output' => [ // JS var: avadaLiveSearchVars.per_page. [ 'element' => 'helperElement', 'property' => 'bottom', 'js_callback' => [ 'fusionGlobalScriptSet', [ 'globalVar' => 'avadaLiveSearchVars', 'id' => 'per_page', 'trigger' => [ 'avadaLiveSearch' ], ], ], 'sanitize_callback' => '__return_empty_string', ], ], ], 'live_search_results_height' => [ 'label' => esc_html__( 'Live Search Results Container Height', 'Avada' ), 'description' => esc_html__( 'Controls the height of the container in which the search results will be listed.', 'Avada' ), 'id' => 'live_search_results_height', 'default' => '250', 'type' => 'slider', 'choices' => [ 'min' => '100', 'max' => '800', 'step' => '5', ], 'required' => [ [ 'setting' => 'live_search', 'operator' => '=', 'value' => '1', ], ], 'css_vars' => [ [ 'name' => '--live_search_results_height', 'element' => '.fusion-search-results', 'value_pattern' => '$px', ], ], ], 'live_search_display_featured_image' => [ 'label' => esc_html__( 'Live Search Display Featured Image', 'Avada' ), 'description' => esc_html__( 'Turn on to display the featured image of each live search result.', 'Avada' ), 'id' => 'live_search_display_featured_image', 'default' => '1', 'type' => 'switch', 'required' => [ [ 'setting' => 'live_search', 'operator' => '=', 'value' => '1', ], ], 'output' => [ // JS var: avadaLiveSearchVars.show_feat_img. [ 'element' => 'helperElement', 'property' => 'bottom', 'js_callback' => [ 'fusionGlobalScriptSet', [ 'globalVar' => 'avadaLiveSearchVars', 'id' => 'show_feat_img', 'trigger' => [ 'avadaLiveSearch' ], ], ], 'sanitize_callback' => '__return_empty_string', ], ], ], 'live_search_display_post_type' => [ 'label' => esc_html__( 'Live Search Display Post Type', 'Avada' ), 'description' => esc_html__( 'Turn on to display the post type of each live search result.', 'Avada' ), 'id' => 'live_search_display_post_type', 'default' => '1', 'type' => 'switch', 'required' => [ [ 'setting' => 'live_search', 'operator' => '=', 'value' => '1', ], ], 'output' => [ // JS var: avadaLiveSearchVars.display_post_type. [ 'element' => 'helperElement', 'property' => 'bottom', 'js_callback' => [ 'fusionGlobalScriptSet', [ 'globalVar' => 'avadaLiveSearchVars', 'id' => 'display_post_type', 'trigger' => [ 'avadaLiveSearch' ], ], ], 'sanitize_callback' => '__return_empty_string', ], ], ], ], ], ], ]; $sections['search']['fields']['search_page_options_section'] = [ 'label' => esc_html__( 'Search Page', 'Avada' ), 'description' => '', 'id' => 'search_page_options_section', 'icon' => true, 'type' => 'sub-section', 'fields' => [ 'search_page_options_template_notice' => [ 'id' => 'search_page_options_template_notice', 'label' => '', 'hidden' => ! $has_global_content, 'description' => class_exists( 'Fusion_Template_Builder' ) ? sprintf( /* translators: 1: Content|Footer|Page Title Bar. 2: URL. */ '