Opal-Estate-Pro/templates/search-box/search-form-v.php

66 lines
2.0 KiB
PHP
Raw Normal View History

2019-09-10 06:27:33 +02:00
<?php
/**
* The template for vertival search
*
* @version 1.0.0
*/
defined( 'ABSPATH' ) || exit;
$GLOBALS['group-info-column'] = 1;
2020-06-05 04:21:25 +02:00
$display_category = isset( $display_category ) ? $display_category : true;
2019-09-10 06:27:33 +02:00
$display_country = isset( $display_country ) ? $display_country : true;
$display_state = isset( $display_state ) ? $display_state : true;
$display_city = isset( $display_city ) ? $display_city : true;
$display_more_options = isset( $display_more_options ) ? $display_more_options : true;
$form_classes = [
'opalestate-search-form',
'opalestate-search-form--vertical',
isset( $hidden_labels ) && $hidden_labels ? 'hidden-labels' : '',
];
?>
<form class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $form_classes ) ) ); ?>" action="<?php echo esc_url( opalestate_get_search_link() ); ?>" method="GET">
<?php
2020-06-05 04:21:25 +02:00
if ( $display_category ) {
echo opalestate_load_template_path( 'search-box/fields/categories' );
}
2019-09-10 06:27:33 +02:00
if ( $display_country ) {
echo opalestate_load_template_path( 'search-box/fields/country-select' );
}
if ( $display_state ) {
echo opalestate_load_template_path( 'search-box/fields/state-select' );
}
if ( $display_city ) {
echo opalestate_load_template_path( 'search-box/fields/city-select' );
}
?>
<?php echo opalestate_load_template_path( 'search-box/fields/types' ); ?>
<?php echo opalestate_load_template_path( 'search-box/fields/group-info', [ 'type' => 'input' ] ); ?>
2019-10-10 05:41:57 +02:00
<?php if ( opalestate_is_enable_price_field() ) : ?>
<?php echo opalestate_load_template_path( 'search-box/fields/price' ); ?>
<?php endif; ?>
2019-09-10 06:27:33 +02:00
<?php
if ( $display_more_options ) {
echo opalestate_load_template_path( 'search-box/fields/more-options' );
}
?>
<?php if ( ! isset( $nobutton ) || ! $nobutton ) : ?>
<?php echo opalestate_load_template_path( 'search-box/fields/submit-button' ); ?>
<?php endif; ?>
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
</form>