Merge branch 'master' of https://github.com/wpopal/opal-estate-pro
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<?php endif; ?>
|
||||
<div class="agents-collection-wrap">
|
||||
<?php if( $query->have_posts() ): ?>
|
||||
<div class="agents-container">
|
||||
<div class="agents-container">
|
||||
<div <?php echo $attrs; ?>>
|
||||
<?php $cnt=0; while( $query->have_posts() ): $query->the_post(); ?>
|
||||
<div class="column-item ">
|
||||
|
||||
@@ -1,37 +1,10 @@
|
||||
<?php
|
||||
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
||||
$rowcls = apply_filters( 'opalestate_row_container_class', 'opal-row' );
|
||||
|
||||
$atts = array(
|
||||
'paged' => 1,
|
||||
'search_form' => $settings['search_form']
|
||||
);
|
||||
?>
|
||||
<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>
|
||||
<?php echo opalestate_load_template_path( 'shortcodes/search-split-maps', $atts ); ?>
|
||||
@@ -36,6 +36,9 @@ switch ( $supports[ $post_type ]['post_type'] ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if( !is_object($object) ) {
|
||||
return;
|
||||
}
|
||||
$cpt_feature = $supports[ $post_type ]['features_cpt'];
|
||||
$features = Opalestate_Rating_Helper::get_features( $cpt_feature );
|
||||
|
||||
|
||||
37
templates/shortcodes/agency-carousel.php
Normal file
37
templates/shortcodes/agency-carousel.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$_id = time();
|
||||
$query = Opalestate_Query::get_agencies( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
|
||||
$item = $column;
|
||||
$data = [
|
||||
'slidesPerView' => $item,
|
||||
'spaceBetween' => 30,
|
||||
'slidesPerGroup' => $item,
|
||||
'loop' => false,
|
||||
];
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-agency-carousel opalestate-rows">
|
||||
<?php if ( $query->have_posts() ) : ?>
|
||||
<div class="opalestate-swiper-play swiper-container" id="postcarousel-<?php echo esc_attr( $_id ); ?>" data-swiper="<?php echo esc_attr( wp_json_encode( $data ) ); ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php
|
||||
$column = 5;
|
||||
$clscol = floor( 12 / $column );
|
||||
while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="swiper-slide">
|
||||
<?php echo opalestate_load_template_path( 'content-agency-grid' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( absint( $query->post_count ) > absint( $item ) ) : ?>
|
||||
<div class="swiper-pagination"></div>
|
||||
<div class="swiper-button-prev"> <i class="fas fa-angle-left"></i></div>
|
||||
<div class="swiper-button-next"> <i class="fas fa-angle-right"></i></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
37
templates/shortcodes/agent-carousel.php
Normal file
37
templates/shortcodes/agent-carousel.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
$_id = time();
|
||||
$query = Opalestate_Query::get_agents( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured );
|
||||
$item = $column;
|
||||
$data = [
|
||||
'slidesPerView' => $item,
|
||||
'spaceBetween' => 30,
|
||||
'slidesPerGroup' => $item,
|
||||
'loop' => false,
|
||||
];
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-agent-carousel opalestate-rows">
|
||||
<?php if ( $query->have_posts() ) : ?>
|
||||
<div class="opalestate-swiper-play swiper-container" id="postcarousel-<?php echo esc_attr( $_id ); ?>" data-swiper="<?php echo esc_attr( wp_json_encode( $data ) ); ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php
|
||||
$column = 5;
|
||||
$clscol = floor( 12 / $column );
|
||||
while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="swiper-slide">
|
||||
<?php echo opalestate_load_template_path( 'content-agent-grid' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( absint( $query->post_count ) > absint( $item ) ) : ?>
|
||||
<div class="swiper-pagination"></div>
|
||||
<div class="swiper-button-prev"> <i class="fas fa-angle-left"></i></div>
|
||||
<div class="swiper-button-next"> <i class="fas fa-angle-right"></i></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -1,22 +1,45 @@
|
||||
<?php
|
||||
|
||||
$args = [
|
||||
'posts_per_page' => -1,
|
||||
'posts_per_page' => $posts_per_page,
|
||||
'showmode' => $showmode,
|
||||
'categories' => $categories,
|
||||
'types' => $types,
|
||||
'labels' => $labels,
|
||||
'cities' => $cities,
|
||||
'statuses' => $statuses,
|
||||
];
|
||||
|
||||
$query = Opalestate_Query::get_property_query( $args );
|
||||
|
||||
$class = 'column-item';
|
||||
$clscol = floor( 12 / $column );
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-property-collection">
|
||||
|
||||
<?php if ( $query->have_posts() ): ?>
|
||||
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="column-item">
|
||||
<?php echo opalestate_load_template_path( 'content-property-grid-v2' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<div class="opal-row">
|
||||
<?php $cnt=0; while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<?php
|
||||
$cls = '';
|
||||
if ( $cnt++ % $column == 0 ) {
|
||||
$cls .= ' first-child';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo $cls; ?> col-lg-<?php echo esc_attr( $clscol ); ?> col-md-<?php echo esc_attr( $clscol ); ?> col-sm-6" data-related="map" data-id="<?php echo
|
||||
esc_attr( $cnt - 1 );
|
||||
?>">
|
||||
<?php echo opalestate_load_template_path( $layout ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $query->max_num_pages > 1 && $show_pagination ): ?>
|
||||
<div class="w-pagination"><?php opalestate_pagination( $query->max_num_pages ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_load_template_path( 'content-no-results' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
4
templates/shortcodes/search-agencies.php
Normal file
4
templates/shortcodes/search-agencies.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="search-agency-form-wrap">
|
||||
<?php echo opalestate_load_template_path( 'parts/'.$form, array('current_uri' => $current_uri ) ); ?>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<div class="opalestate-search-properties-v">
|
||||
<div class="search-properies-form">
|
||||
<?php echo opalestate_load_template_path( 'parts/search-form-v' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
31
templates/shortcodes/search-split-maps.php
Executable file
31
templates/shortcodes/search-split-maps.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<div class="ajax-map-search-split full-width">
|
||||
<div class="inner">
|
||||
<div class="opal-row">
|
||||
<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/'.$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