Fix single agency properties
This commit is contained in:
@@ -13,28 +13,24 @@ if ( $query->have_posts() ) :
|
||||
<div class="clearfix clear"></div>
|
||||
<div class="opalestate-box-inner property-agency-section">
|
||||
<h4 class="box-heading hide"><?php echo sprintf( esc_html__( 'My Properties', 'opalestate-pro' ), $query->found_posts ); ?></h4>
|
||||
<div class="opalestate-rows">
|
||||
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>" id="<?php echo esc_attr( $id ); ?>">
|
||||
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<?php echo opalestate_load_template_path( 'content-property-list-v2' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php if ( $query->max_num_pages > 1 ): ?>
|
||||
<div class="w-pagination"><?php // echo $query->max_num_pages; // opalestate_pagination( $query->max_num_pages ); ?></div>
|
||||
<div class="opalestate-load-more text-center" data-post_id="<?php echo $agency_id; ?>" data-action="get_agency_property" data-related="<?php echo esc_attr( $id ); ?>"
|
||||
data-numpage="<?php echo
|
||||
$query->max_num_pages; ?>" data-paged="2">
|
||||
<button class="btn btn-primary btn-3d"> <?php esc_html_e( 'Load More', 'opalestate-pro' ); ?></button>
|
||||
<div class="ajax-load-properties" data-paged="1" data-type="agency" data-id="<?php echo get_the_ID(); ?>">
|
||||
<div class="opalestate-rows">
|
||||
<div class="<?php echo apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?>" id="<?php echo esc_attr( $id ); ?>">
|
||||
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<?php echo opalestate_load_template_path( 'content-property-list-v2' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $query->max_num_pages > 1 ): ?>
|
||||
<div class="w-pagination"><?php opalestate_pagination( $query->max_num_pages ); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="opalestate-message">
|
||||
<?php esc_html_e( 'My Agency has not any property yet.', 'opalestate-pro' ); ?>
|
||||
<?php esc_html_e( 'The agency has not any property yet.', 'opalestate-pro' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
global $post;
|
||||
|
||||
$limit = apply_filters( 'opalesate_agent_properties_limit', 10 );
|
||||
$limit = apply_filters( 'opalesate_agent_properties_limit', 5 );
|
||||
$query = Opalestate_Query::get_agent_property( null, get_the_ID(), $limit );
|
||||
|
||||
if ( $query->have_posts() ) : ?>
|
||||
|
||||
Reference in New Issue
Block a user