'', // Default width of the search input field 'alignment' => 'center', // Default alignment of the search bar (left, center, right) 'placeholder' => 'Search...', // Default placeholder text for the search input 'class' => '', // Custom CSS class for the search form 'button_text' => 'Search' // Default text for the search button ), $atts); // Set the alignment CSS based on the 'alignment' attribute $alignment_styles = ''; if ($atts['alignment'] === 'center') { $alignment_styles = 'text-align: center;'; } elseif ($atts['alignment'] === 'right') { $alignment_styles = 'text-align: right;'; } // Construct the search form HTML with custom attributes $form = '
'; return $form; } add_shortcode('aio_search', 'aiosc_shortcode_search_bar');