Origin commit
This commit is contained in:
59
templates/elementor-templates/opalestate-agency-collection.php
Executable file
59
templates/elementor-templates/opalestate-agency-collection.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
$settings = $this->get_settings_for_display();
|
||||
$layout = $settings['item_layout'];
|
||||
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
|
||||
if( isset($_GET['display']) && $_GET['display'] == 'grid' ){
|
||||
$layout = 'grid';
|
||||
|
||||
}else if( isset($_GET['display']) && $_GET['display'] == 'list' ){
|
||||
$layout = 'list';
|
||||
$attrs = 'class="column-list"';
|
||||
}
|
||||
$onlyfeatured = 0;
|
||||
if( isset($_GET['s_agents']) ) {
|
||||
$query = Opalestate_Query::get_agencies( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
|
||||
} else {
|
||||
$query = OpalEstate_Search::get_search_agencies_query();
|
||||
}
|
||||
|
||||
$rowcls = apply_filters('opalestate_row_container_class', 'opal-row');
|
||||
?>
|
||||
|
||||
<?php if( $settings['enable_sortable_bar'] ): ?>
|
||||
<div class="opalesate-archive-top"><div class="<?php echo $rowcls;?>">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="collection-counter">
|
||||
<span><?php echo sprintf( esc_html__('Found %s Agency', 'opalestate-pro'), '<span class="text-primary">'.$query->found_posts.'</span>' ) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||
<div class="opalestate-sortable">
|
||||
<?php echo opalestate_render_sortable_dropdown(); ?>
|
||||
</div>
|
||||
<?php opalestate_show_display_modes(); ?>
|
||||
</div>
|
||||
</div></div>
|
||||
<?php endif; ?>
|
||||
<div class="agency-collection-wrap">
|
||||
<?php if( $query->have_posts() ): ?>
|
||||
<div class="agency-container">
|
||||
<div <?php echo $attrs; ?>>
|
||||
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
|
||||
<div class="column-item ">
|
||||
<?php echo opalestate_load_template_path( 'content-agency-'.$layout ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if( $query->max_num_pages ): ?>
|
||||
<div class="w-pagination">
|
||||
<?php opalestate_pagination( $query->max_num_pages ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="agency-results">
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
62
templates/elementor-templates/opalestate-agent-collection.php
Executable file
62
templates/elementor-templates/opalestate-agent-collection.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
$settings = $this->get_settings_for_display();
|
||||
$layout = $settings['item_layout'];
|
||||
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
|
||||
if( isset($_GET['display']) && $_GET['display'] == 'grid' ){
|
||||
$layout = 'grid';
|
||||
|
||||
}else if( isset($_GET['display']) && $_GET['display'] == 'list' ){
|
||||
$layout = 'list';
|
||||
$attrs = 'class="column-list"';
|
||||
}
|
||||
|
||||
$onlyfeatured = 0 ;
|
||||
|
||||
if( isset($_GET['s_agents']) ) {
|
||||
$query = Opalestate_Query::get_agents( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
|
||||
} else {
|
||||
$query = OpalEstate_Search::get_search_agents_query();
|
||||
}
|
||||
|
||||
$form = $settings['search_form'] ? "search-agents-form-".$settings['search_form']: "search-agents-form";
|
||||
$rowcls = apply_filters('opalestate_row_container_class', 'opal-row');
|
||||
?>
|
||||
|
||||
<?php if( $settings['enable_sortable_bar'] ): ?>
|
||||
<div class="opalesate-archive-top"><div class="<?php echo esc_attr( $rowcls ); ?>">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="collection-counter">
|
||||
<span><?php echo sprintf( esc_html__('Found %s Agents', 'opalestate-pro'), '<span class="text-primary">'.$query->found_posts.'</span>' ) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||
<div class="opalestate-sortable">
|
||||
<?php echo opalestate_render_sortable_dropdown(); ?>
|
||||
</div>
|
||||
<?php opalestate_show_display_modes(); ?>
|
||||
</div>
|
||||
</div></div>
|
||||
<?php endif; ?>
|
||||
<div class="agents-collection-wrap">
|
||||
<?php if( $query->have_posts() ): ?>
|
||||
<div class="agents-container">
|
||||
<div <?php echo $attrs; ?>>
|
||||
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
|
||||
<div class="column-item ">
|
||||
<?php echo opalestate_load_template_path( 'content-agent-'.$layout ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if( $query->max_num_pages ): ?>
|
||||
<div class="w-pagination">
|
||||
<?php opalestate_pagination( $query->max_num_pages ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="agents-results">
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
66
templates/elementor-templates/opalestate-category-list.php
Executable file
66
templates/elementor-templates/opalestate-category-list.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
$args = [
|
||||
'number' => $settings['limit'],
|
||||
'orderby' => $settings['orderby'],
|
||||
'order' => $settings['order'],
|
||||
];
|
||||
|
||||
if ( $settings['categories'] ) {
|
||||
$args['slug'] = $settings['categories'];
|
||||
}
|
||||
|
||||
$terms = Opalestate_Taxonomy_Categories::get_list( $args );
|
||||
|
||||
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
|
||||
|
||||
?>
|
||||
<div class="category-list-collection ">
|
||||
<div <?php echo $attrs; ?>>
|
||||
<?php foreach ( $terms as $category ): ?>
|
||||
<?php
|
||||
$tax_link = get_term_link( $category->term_id );
|
||||
$image = wp_get_attachment_image_url( get_term_meta( $category->term_id, 'opalestate_category_image_id', true ), 'full' );
|
||||
?>
|
||||
<div class="column-item property-category ">
|
||||
<a href="<?php echo esc_url( $tax_link ); ?>" class="category-overlay"></a>
|
||||
<?php
|
||||
$style = '';
|
||||
if ( $image ) {
|
||||
$style = 'style="background-image:url(' . esc_url( $image ) . ')"';
|
||||
} else {
|
||||
$style = 'style="background-image:url(' . opalestate_get_image_placeholder_src() . ')"';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="property-category-bg" <?php echo $style; ?>>
|
||||
</div>
|
||||
<div class="static-content">
|
||||
<div class="property-category-info text-center">
|
||||
<?php if ( $category->name ) : ?>
|
||||
<h4 class="property-category-title">
|
||||
<a href="<?php echo esc_url( $tax_link ); ?>"><?php echo esc_html( $category->name ); ?></a>
|
||||
</h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $category->count ) : ?>
|
||||
<div class="property-category-count">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: number of properties */
|
||||
_nx(
|
||||
'%1$s Property',
|
||||
'%1$s Properties',
|
||||
$category->count,
|
||||
'opalestate-pro'
|
||||
),
|
||||
number_format_i18n( $category->count )
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
66
templates/elementor-templates/opalestate-city-list.php
Executable file
66
templates/elementor-templates/opalestate-city-list.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
$args = [
|
||||
'number' => $settings['limit'],
|
||||
'orderby' => $settings['orderby'],
|
||||
'order' => $settings['order'],
|
||||
];
|
||||
|
||||
if ( $settings['categories'] ) {
|
||||
$args['slug'] = $settings['categories'];
|
||||
}
|
||||
|
||||
$terms = Opalestate_Taxonomy_City::get_list( $args );
|
||||
|
||||
$attrs = $this->get_render_attribute_string( 'wrapper-style' );
|
||||
|
||||
?>
|
||||
<div class="city-list-collection ">
|
||||
<div <?php echo $attrs; ?>>
|
||||
<?php foreach ( $terms as $city ): ?>
|
||||
<?php
|
||||
$tax_link = get_term_link( $city->term_id );
|
||||
$image = wp_get_attachment_image_url( get_term_meta( $city->term_id, 'opalestate_city_image_id', true ), 'full' );
|
||||
?>
|
||||
<div class="column-item property-city ">
|
||||
<a href="<?php echo esc_url( $tax_link ); ?>" class="city-overlay"></a>
|
||||
<?php
|
||||
$style = '';
|
||||
if ( $image ) {
|
||||
$style = 'style="background-image:url(' . esc_url( $image ) . ')"';
|
||||
} else {
|
||||
$style = 'style="background-image:url(' . opalestate_get_image_placeholder_src() . ')"';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="property-city-bg" <?php echo $style; ?>>
|
||||
</div>
|
||||
<div class="static-content">
|
||||
<div class="property-city-info text-center">
|
||||
<?php if ( $city->name ) : ?>
|
||||
<h4 class="property-city-title">
|
||||
<a href="<?php echo esc_url( $tax_link ); ?>"><?php echo esc_html( $city->name ); ?></a>
|
||||
</h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $city->count ) : ?>
|
||||
<div class="property-city-count">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: number of properties */
|
||||
_nx(
|
||||
'%1$s Property',
|
||||
'%1$s Properties',
|
||||
$city->count,
|
||||
'opalestate-pro'
|
||||
),
|
||||
number_format_i18n( $city->count )
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
30
templates/elementor-templates/opalestate-form-builder.php
Executable file
30
templates/elementor-templates/opalestate-form-builder.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for form builder.
|
||||
*
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<form class="opalestate-search-form" action="<?php echo opalestate_get_search_link(); ?>" method="get">
|
||||
<?php if ( isset( $settings['fields'] ) ) : ?>
|
||||
<div class="opal-row">
|
||||
<?php foreach ( $settings['fields'] as $field ): ?>
|
||||
<?php if ( $field['field'] ): ?>
|
||||
<div class="col-md-<?php echo $field['column']; ?> col-sm-12">
|
||||
<?php echo opalestate_load_template_path( 'search-box/fields/' . $field['field'] ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'opalestate_after_search_properties_form' ); ?>
|
||||
</form>
|
||||
<?php if ( 0 ): ?>
|
||||
<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">
|
||||
<?php echo opalestate_load_template_path( 'shortcodes/ajax-map-search-result' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
18
templates/elementor-templates/opalestate-map-top-search.php
Executable file
18
templates/elementor-templates/opalestate-map-top-search.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php if( isset($settings['enable_static']) && $settings['enable_static'] ): ?>
|
||||
<div class="opalestate-map-preview-wrap maps-container-fixed" >
|
||||
<?php else : ?>
|
||||
<div class="opalestate-map-preview-wrap" >
|
||||
<?php endif; ?>
|
||||
<div id="opalestate-map-preview" style="min-height:700px">
|
||||
<div id="mapView">
|
||||
<div class="mapPlaceholder"><!-- <span class="fa fa-spin fa-spinner"></span> <?php //esc_html_e( 'Loading map...', 'opalestate-pro' ); ?> -->
|
||||
<div class="sk-folding-cube">
|
||||
<div class="sk-cube1 sk-cube"></div>
|
||||
<div class="sk-cube2 sk-cube"></div>
|
||||
<div class="sk-cube4 sk-cube"></div>
|
||||
<div class="sk-cube3 sk-cube"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
34
templates/elementor-templates/opalestate-office-agent-search.php
Executable file
34
templates/elementor-templates/opalestate-office-agent-search.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
extract( $settings );
|
||||
return;
|
||||
?>
|
||||
<?php if ( isset( $description ) ): ?>
|
||||
<div class="search-agent-form-description"><?php echo $description; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( class_exists( "Opalestate_Template_Loader" ) ) : ?>
|
||||
<div class="opalestate-search-tabs">
|
||||
<ul class="nav nav-tabs tab-v8" role="tablist">
|
||||
<li class="active">
|
||||
<a aria-expanded="false" href="#search-agent" role="tab" class="tab-item">
|
||||
<span><?php esc_html_e( 'Find An Agent', 'opalestate-pro' ); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a aria-expanded="true" href="#search-agency" role="tab" class="tab-item">
|
||||
<span><?php esc_html_e( 'Find An Agency', 'opalestate-pro' ); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade out active in" id="search-agent">
|
||||
<?php echo opalestate_load_template_path( 'parts/search-agents-form' ); ?>
|
||||
</div>
|
||||
<div class="tab-pane fade out" id="search-agency">
|
||||
<?php echo opalestate_load_template_path( 'parts/search-agency-form' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
54
templates/elementor-templates/opalestate-property-collection.php
Executable file
54
templates/elementor-templates/opalestate-property-collection.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$settings = array_merge( [
|
||||
'limit' => 5,
|
||||
'column' => 3,
|
||||
'paged' => 1,
|
||||
'showsortby' => false,
|
||||
'style' => 'grid',
|
||||
], $settings );
|
||||
extract( $settings );
|
||||
|
||||
if ( is_front_page() ) {
|
||||
$paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1;
|
||||
} else {
|
||||
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
||||
}
|
||||
|
||||
$args = [
|
||||
'posts_per_page' => $posts_per_page,
|
||||
'paged' => $paged,
|
||||
'cities' => $cities,
|
||||
'categories' => $categories,
|
||||
'operator' => $cat_operator,
|
||||
'types' => $types,
|
||||
'statuses' => $statuses,
|
||||
'showmode' => $showmode,
|
||||
'labels' => $labels,
|
||||
];
|
||||
|
||||
$query = Opalestate_Query::get_property_query( $args );
|
||||
|
||||
$class = 'column-item';
|
||||
?>
|
||||
<?php if ( isset( $showsortby ) && $showsortby ): ?>
|
||||
<?php echo opalestate_load_template_path( 'collection-navigator', [ 'mode' => 'list' ] ); ?>
|
||||
<?php endif; ?>
|
||||
<div class="opalesate-property-collection">
|
||||
|
||||
<?php if ( $query->have_posts() ): ?>
|
||||
<div <?php echo $this->get_render_attribute_string( 'wrapper-style' ); ?>>
|
||||
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="column-item">
|
||||
<?php echo opalestate_load_template_path( 'content-property-' . $style ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( isset( $pagination ) && $pagination && ( ! isset( $enable_carousel ) || ! $enable_carousel ) ): ?>
|
||||
<div class="w-pagination"><?php opalestate_pagination( $pagination_page_limit ); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
11
templates/elementor-templates/opalestate-search-agency.php
Executable file
11
templates/elementor-templates/opalestate-search-agency.php
Executable file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$settings = $this->get_settings_for_display();
|
||||
$layout = $settings['item_layout'];
|
||||
$form = $settings['search_form'] ? "search-agency-form-".$settings['search_form']: "search-agency-form";
|
||||
|
||||
|
||||
?>
|
||||
<div class="search-agency-form-wrap">
|
||||
<?php echo opalestate_load_template_path( 'parts/'.$form, array('current_uri' => $settings['current_uri'] ) ); ?>
|
||||
</div>
|
||||
|
||||
10
templates/elementor-templates/opalestate-search-agents.php
Executable file
10
templates/elementor-templates/opalestate-search-agents.php
Executable file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$settings = $this->get_settings_for_display();
|
||||
$layout = $settings['item_layout'];
|
||||
$form = $settings['search_form'] ? "search-agents-form-".$settings['search_form']: "search-agents-form";
|
||||
|
||||
?>
|
||||
<div class="search-agents-form-wrap">
|
||||
<?php echo opalestate_load_template_path( 'parts/'.$form, array('current_uri' => $settings['current_uri'] ) ); ?>
|
||||
</div>
|
||||
|
||||
14
templates/elementor-templates/opalestate-search-property-results.php
Executable file
14
templates/elementor-templates/opalestate-search-property-results.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$display = array(
|
||||
'style' => $settings['style'],
|
||||
'column' => $settings['column']
|
||||
);
|
||||
// echo time().'<pre> ha congtein' . print_r( $display ,1 ).'</pre>';
|
||||
|
||||
|
||||
?>
|
||||
<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">
|
||||
|
||||
<?php echo opalestate_load_template_path( 'shortcodes/ajax-map-search-result' , $display ); ?>
|
||||
|
||||
</div>
|
||||
9
templates/elementor-templates/opalestate-searchbox.php
Executable file
9
templates/elementor-templates/opalestate-searchbox.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
if ( ! class_exists( 'OpalEstate_Search' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="search-properies-form">
|
||||
<?php echo opalestate_load_template_path( 'search-box/'.$settings['style'] , $settings ); ?>
|
||||
</div>
|
||||
37
templates/elementor-templates/opalestate-split-maps-search.php
Executable file
37
templates/elementor-templates/opalestate-split-maps-search.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
||||
$rowcls = apply_filters( 'opalestate_row_container_class', 'opal-row' );
|
||||
?>
|
||||
<div class="ajax-map-search-split full-width">
|
||||
<div class="inner">
|
||||
|
||||
<div class="<?php echo esc_attr( $rowcls ); ?>">
|
||||
<div class="col-lg-6 col-md-12 col-sm-12 split-maps-container">
|
||||
<div id="opalestate-map-preview" style="height:800px;" data-page="<?php echo esc_attr( $paged ); ?>">
|
||||
<div id="mapView">
|
||||
<div class="mapPlaceholder"><span class="fa fa-spin fa-spinner"></span> <?php esc_html_e( 'Loading map...', 'opalestate-pro' ); ?>
|
||||
<div class="sk-folding-cube">
|
||||
<div class="sk-cube1 sk-cube"></div>
|
||||
<div class="sk-cube2 sk-cube"></div>
|
||||
<div class="sk-cube4 sk-cube"></div>
|
||||
<div class="sk-cube3 sk-cube"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-12 col-sm-12 pull-right">
|
||||
<div class="split-search-container">
|
||||
<div class="ajax-search-form">
|
||||
<?php echo opalestate_load_template_path( 'search-box/' . $settings['search_form'], [ 'nobutton' => true ] ); ?>
|
||||
</div>
|
||||
|
||||
<div class="opalesate-properties-ajax opalesate-properties-results" data-mode="html">
|
||||
<?php echo opalestate_load_template_path( 'shortcodes/ajax-map-search-result', [ 'column' => 2 ] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user