I am using a wordpress template, it is called Houzez, which only has three search options for the written search form, the three options are these:
- Property title and content.
- Property address, street, zip code and ID.
- Area, City and State.
But I want to use the three search options at the same time, although there is no such option, so I looked in the editor of the theme and found the codes but I am not a specialist in the subject, I am just an entrepreneur, so I ask for your help so that you can help me find a way to do it through the codes.
Thanks.
Sorry if there are errors in my writing, I'm not very good at English.
Houzez: keyword-banner.php (template-parts/search/fields/keyword-banner.php)
<?php
$keyword_field = houzez_option('keyword_field');
if( $keyword_field == 'prop_title' ) {
$keyword_placeholder = houzez_option('srh_keyword', 'Enter Keyword...');
} else if( $keyword_field == 'prop_city_state_county' ) {
$keyword_placeholder = houzez_option('srh_csa', 'Search City, State or Area');
} else if( $keyword_field == 'prop_address' ) {
$keyword_placeholder = houzez_option('srh_address', 'Enter an address, town, street, zip or property ID');
} else {
$keyword_placeholder = houzez_option('srh_keyword', 'Enter Keyword...');
}
$keyword = isset ( $_GET['keyword'] ) ? $_GET['keyword'] : ''; ?>
<div class="form-group">
<div class="search-icon">
<input name="keyword" type="text" data-type="banner" class="houzez-keyword-autocomplete form-control" value="<?php echo esc_attr($keyword); ?>" placeholder="<?php echo esc_attr($keyword_placeholder); ?>">
</div><!-- search-icon -->
</div><!-- form-group -->
Houzez: keyword.php (template-parts/search/fields/keyword.php)
<?php
$keyword_field = houzez_option('keyword_field');
if( $keyword_field == 'prop_title' ) {
$keyword_placeholder = houzez_option('srh_keyword', 'Enter Keyword...');
} else if( $keyword_field == 'prop_city_state_county' ) {
$keyword_placeholder = houzez_option('srh_csa', 'Search City, State or Area');
} else if( $keyword_field == 'prop_address' ) {
$keyword_placeholder = houzez_option('srh_address', 'Enter an address, town, street, zip or property ID');
} else {
$keyword_placeholder = houzez_option('srh_keyword', 'Enter Keyword...');
}
$keyword_autocomplete = houzez_option('keyword_autocomplete');
$keyword = isset ( $_GET['keyword'] ) ? $_GET['keyword'] : ''; ?>
<div class="form-group">
<div class="search-icon">
<?php if( $keyword_autocomplete != 1 ) { ?>
<input name="keyword" type="text" class="<?php houzez_ajax_search(); ?> houzez-keyword-autocomplete form-control" value="<?php echo esc_attr($keyword); ?>" placeholder="<?php echo esc_attr($keyword_placeholder); ?>">
<div id="auto_complete_ajax" class="auto-complete"></div>
<?php } else { ?>
<input name="keyword" type="text" class="houzez-keyword-autocomplete form-control" value="<?php echo esc_attr($keyword); ?>" placeholder="<?php echo esc_attr($keyword_placeholder); ?>">
<div id="auto_complete_ajax" class="auto-complete"></div>
<?php } ?>
</div><!-- search-icon -->
</div><!-- form-group -->
IMAGE: