Origin commit
This commit is contained in:
130
templates/single-agent/author-box.php
Executable file
130
templates/single-agent/author-box.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
$agent = new OpalEstate_Agent();
|
||||
?>
|
||||
<div class="property-agent-contact ">
|
||||
<div class="agent-box">
|
||||
<div class="agent-preview">
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<div class="team-header <?php if ( ! has_post_thumbnail() ) {
|
||||
echo 'without-image';
|
||||
} ?>">
|
||||
<a href="<?php the_permalink(); ?>" class="agent-box-image-inner <?php if ( ! empty( $agent ) ) : ?>has-agent<?php endif; ?>">
|
||||
<?php the_post_thumbnail( apply_filters( 'opalestate_single_agent_thumbnail', 'full' ) ); ?>
|
||||
</a>
|
||||
<?php $agent->render_level(); ?>
|
||||
<?php if ( $agent->is_featured() ): ?>
|
||||
<span class="agent-featured" data-toggle="tooltip" data-placement="top" title="<?php esc_html_e( 'Featured Agent', 'opalestate-pro' ); ?>">
|
||||
<span class="agent-label">
|
||||
<span><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>
|
||||
</span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $agent->get_trusted() ): ?>
|
||||
<span class="trusted-label hint--top" aria-label="<?php esc_html_e( 'Trusted Member', 'opalestate-pro' ); ?>"
|
||||
title="<?php esc_html_e( 'Trusted Member', 'opalestate-pro' ); ?>">
|
||||
<i class="fa fa-star"></i>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div><!-- /.agent-box-image -->
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="agent-box-meta opalestate-sidebar-box">
|
||||
<h4 class="agent-box-title">
|
||||
<?php esc_html_e( 'Agent details', 'opalestate-pro' ); ?>
|
||||
</h4><!-- /.agent-box-title -->
|
||||
|
||||
<?php $job = $agent->get_meta( 'job' ); ?>
|
||||
<p class="agent-box-job"><?php echo esc_html( $job ); ?></p>
|
||||
|
||||
<?php $email = $agent->get_meta( 'email' ); ?>
|
||||
<?php if ( ! empty( $email ) ) : ?>
|
||||
<div class="agent-box-email">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<a href="mailto:<?php echo esc_attr( $email ); ?>">
|
||||
<span><?php echo esc_attr( $email ); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $phone = $agent->get_meta( 'phone' ); ?>
|
||||
<?php if ( ! empty( $phone ) ) : ?>
|
||||
<div class="agent-box-phone">
|
||||
<i class="fa fa-phone"></i>
|
||||
<a href="tel:<?php echo sanitize_title( $phone ); ?>">
|
||||
<span><?php echo esc_attr( $phone ); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $mobile = $agent->get_meta( 'mobile' ); ?>
|
||||
<?php if ( ! empty( $mobile ) ) : ?>
|
||||
<div class="agent-box-mobile">
|
||||
<i class="fa fa-mobile"></i>
|
||||
<a href="tel:<?php echo sanitize_title( $mobile ); ?>">
|
||||
<span><?php echo esc_attr( $mobile ); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $fax = $agent->get_meta( 'fax' ); ?>
|
||||
<?php if ( ! empty( $fax ) ) : ?>
|
||||
<div class="agent-box-fax">
|
||||
<i class="fa fa-fax"></i><span><?php echo esc_attr( $fax ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $web = $agent->get_meta( 'web' ); ?>
|
||||
<?php if ( ! empty( $web ) ) : ?>
|
||||
<div class="agent-box-web">
|
||||
<i class="fa fa-globe"></i>
|
||||
<a href="<?php echo esc_attr( $web ); ?>" rel="nofollow" target="_blank">
|
||||
<span><?php echo esc_attr( $web ); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $socials = $agent->get_socials(); ?>
|
||||
|
||||
<?php if ( $socials ) : ?>
|
||||
<div class="opalestate-social-icons">
|
||||
<?php if ( isset( $socials['facebook'] ) && $socials['facebook'] ) : ?>
|
||||
<a class="opalestate-social-white radius-x opalestate-social-facebook" href="<?php echo esc_url( $socials['facebook'] ); ?>" target="_blank"> <i class="fa fa-facebook"></i> </a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( isset( $socials['twitter'] ) && $socials['twitter'] ) : ?>
|
||||
<a class="opalestate-social-white radius-x opalestate-social-twitter" href="<?php echo esc_url( $socials['twitter'] ); ?>" target="_blank"><i class="fa fa-twitter"></i> </a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( isset( $socials['pinterest'] ) && $socials['pinterest'] ) : ?>
|
||||
<a class="opalestate-social-white radius-x opalestate-social-printerest" href="<?php echo esc_url( $socials['pinterest'] ); ?>" target="_blank"><i class="fa fa-pinterest"></i> </a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( isset( $socials['google'] ) && $socials['google'] ) : ?>
|
||||
<a class="opalestate-social-white radius-x opalestate-social-google" href="<?php echo esc_url( $socials['google'] ); ?>" target="_blank"> <i class="fa fa-google"></i></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( isset( $socials['instagram'] ) && $socials['instagram'] ) : ?>
|
||||
<a class="opalestate-social-white radius-x opalestate-social-instagram" href="<?php echo esc_url( $socials['instagram'] ); ?>" target="_blank"> <i class="fa fa-instagram"></i></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( isset( $socials['linkedIn'] ) && $socials['linkedIn'] ) : ?>
|
||||
<a class="opalestate-social-white radius-x opalestate-social-linkedIn" href="<?php echo esc_url( $socials['linkedIn'] ); ?>" target="_blank"> <i class="fa fa-linkedIn"></i></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div><!-- /.agent-box-meta -->
|
||||
|
||||
<?php if ( is_single() && get_post_type() == 'opalestate_agent' ): ?>
|
||||
<?php else : ?>
|
||||
<div class="agent-box-bio">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
<p class="agent-box-readmore">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php esc_html_e( 'View Profile', 'opalestate-pro' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div><!-- /.agent-box-->
|
||||
</div>
|
||||
1
templates/single-agent/box.php
Executable file
1
templates/single-agent/box.php
Executable file
@@ -0,0 +1 @@
|
||||
<?php echo opalestate_load_template_path( 'single-agent/author-box' ); ?>
|
||||
33
templates/single-agent/featured-properties.php
Executable file
33
templates/single-agent/featured-properties.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
global $post;
|
||||
|
||||
$limit = apply_filters( 'opalesate_agent_properties_limit', 6 );
|
||||
$query = Opalestate_Query::get_agent_property( null, get_the_ID(), $limit, 10, true );
|
||||
|
||||
if ( $query->have_posts() ) :
|
||||
|
||||
$data = [
|
||||
'slidesPerView' => 1,
|
||||
'spaceBetween' => 0,
|
||||
'effect' => 'slide',
|
||||
'loop' => true,
|
||||
'breakpoints' => [ 1024 => [ "slidesPerView" => 1 ] ],
|
||||
];
|
||||
?>
|
||||
|
||||
<div class="my-featured-section" id="block-featured-properties">
|
||||
<h4 class="box-heading"><?php echo sprintf( esc_html__( 'Featured Properties', 'opalestate-pro' ), $query->found_posts ); ?></h4>
|
||||
|
||||
<div class="opalestate-swiper-play swiper-container" id="postcarousel-<?php echo esc_attr( get_the_ID() ); ?>"
|
||||
data-swiper="<?php echo esc_attr( wp_json_encode( $data ) ); ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="swiper-slide">
|
||||
<?php echo opalestate_load_template_path( 'content-property-grid' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
wp_reset_postdata();
|
||||
25
templates/single-agent/form.php
Executable file
25
templates/single-agent/form.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$args = array( 'post_id' => get_the_ID() );
|
||||
|
||||
if( isset($author_id) && $author_id ){
|
||||
|
||||
$args = array(
|
||||
'post_id' => get_the_ID(),
|
||||
'id' => $author_id,
|
||||
'email' => $email,
|
||||
'message' => '',
|
||||
'type' => 'user',
|
||||
);
|
||||
echo opalestate_load_template_path( 'messages/contact-form', $args );
|
||||
}else {
|
||||
$email = get_post_meta( get_the_ID(), OPALESTATE_AGENT_PREFIX . 'email', true );
|
||||
$args = array(
|
||||
'post_id' => get_the_ID(),
|
||||
'id' => get_the_ID(),
|
||||
'email' => $email,
|
||||
'message' => '',
|
||||
'type' => 'agent',
|
||||
);
|
||||
|
||||
echo opalestate_load_template_path( 'messages/contact-form', $args );
|
||||
}
|
||||
29
templates/single-agent/properties.php
Executable file
29
templates/single-agent/properties.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
global $post;
|
||||
|
||||
$limit = apply_filters( 'opalesate_agent_properties_limit', 10 );
|
||||
$query = Opalestate_Query::get_agent_property( null, get_the_ID(), $limit );
|
||||
|
||||
if( $query->have_posts() ) :
|
||||
?>
|
||||
<div class="clearfix clear"></div>
|
||||
<div class="opalestate-box-content my-properties-section" id="block-my-properties">
|
||||
<h4 class="outbox-title"><?php echo sprintf( esc_html__('My Properties', 'opalestate-pro'), $query->found_posts );?></h4>
|
||||
<div class="ajax-load-properties" data-paged="1" data-type="agent" data-id="<?php echo get_the_ID(); ?>">
|
||||
<div class="opalestate-rows">
|
||||
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
|
||||
<?php while( $query->have_posts() ) : $query->the_post(); ?>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<?php echo opalestate_load_template_path( 'content-property-grid' ); ?>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if( $query->max_num_pages > 1 ): ?>
|
||||
<div class="w-pagination"><?php opalestate_pagination( $query->max_num_pages ); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
54
templates/single-agent/summary.php
Executable file
54
templates/single-agent/summary.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<div class="property-agent-contact">
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="property-agent-contact">
|
||||
<div class="agent-box">
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<div class="box-image <?php if ( ! has_post_thumbnail() ) { echo 'without-image'; } ?>">
|
||||
<a href="<?php the_permalink(); ?>" class="agent-box-image-inner <?php if ( ! empty( $agent ) ) : ?>has-agent<?php endif; ?>">
|
||||
<?php the_post_thumbnail( 'agent-thumbnail' ); ?>
|
||||
</a>
|
||||
</div><!-- /.agent-box-image -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="agent-box-meta">
|
||||
|
||||
<?php $email = get_post_meta( get_the_ID(), OPALESTATE_AGENT_PREFIX . 'email', true ); ?>
|
||||
<?php if ( ! empty( $email ) ) : ?>
|
||||
<div class="agent-box-email">
|
||||
<i class="fa fa-email"></i>
|
||||
<a href="mailto:<?php echo esc_attr( $email ); ?>">
|
||||
<?php echo esc_attr( $email ); ?>
|
||||
</a>
|
||||
</div><!-- /.agent-box-email -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $phone = get_post_meta( get_the_ID(), OPALESTATE_AGENT_PREFIX . 'phone', true ); ?>
|
||||
<?php if ( ! empty( $phone ) ) : ?>
|
||||
<div class="agent-box-phone">
|
||||
<?php echo esc_attr( $phone ); ?>
|
||||
</div><!-- /.agent-box-phone -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $web = get_post_meta( get_the_ID(), OPALESTATE_AGENT_PREFIX . 'web', true ); ?>
|
||||
<?php if ( ! empty( $web ) ) : ?>
|
||||
<div class="agent-box-web">
|
||||
<a href="<?php echo esc_attr( $web ); ?>">
|
||||
<?php echo esc_attr( $web ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<h3 class="agent-box-title">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
|
||||
</h3>
|
||||
<div class="content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user