hesabixWpTheme/anspress/search-form.php

29 lines
1.1 KiB
PHP

<?php
/**
* فرم جستجوی سوالات — طرح hesabix2
*
* @package Hesabix2
* @subpackage AnsPress
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$action = function_exists( 'hesabix2_anspress_base_url' ) ? hesabix2_anspress_base_url() : home_url( '/' );
?>
<form id="ap-search-form" class="ap-search-form hesabix2-ap-search flex gap-2" method="get" action="<?php echo esc_url( $action ); ?>">
<label for="hesabix2-ap-search-input" class="sr-only"><?php esc_html_e( 'جستجو در سوالات', 'hesabix2' ); ?></label>
<input
name="ap_s"
type="search"
id="hesabix2-ap-search-input"
class="flex-1 px-4 py-2.5 bg-white border border-slate-200 rounded-xl focus:ring-2 focus:ring-brand-500 text-slate-800 text-sm"
placeholder="<?php esc_attr_e( 'جستجو در سوالات...', 'hesabix2' ); ?>"
value="<?php echo esc_attr( get_query_var( 'ap_s' ) ); ?>"
/>
<button type="submit" class="bg-brand-500 hover:bg-brand-600 text-white px-5 py-2.5 rounded-xl font-semibold text-sm transition">
<?php esc_html_e( 'جستجو', 'hesabix2' ); ?>
</button>
</form>