Origin commit
This commit is contained in:
162
templates/single-agency/author-box.php
Executable file
162
templates/single-agency/author-box.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<?php global $agency;
|
||||
$address = $agency->get_meta( 'address' ); ?>
|
||||
<div class="agency-box">
|
||||
|
||||
<div class="opal-row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-12">
|
||||
<div class="agency-thumb">
|
||||
<div class="agency-inner agency-grid-style">
|
||||
|
||||
<header class="team-header agency-header">
|
||||
<div class="agent-box-image">
|
||||
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<?php the_post_thumbnail(); ?>
|
||||
<?php else: ?>
|
||||
<?php echo opalestate_get_image_placeholder(); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php if ( $agency->is_featured() ): ?>
|
||||
<div class="agency-label">
|
||||
<span class="label label-featured" aria-label="<?php esc_html_e( 'Featured Agency', 'opalestate-pro' ); ?>"
|
||||
title="<?php esc_html_e( 'Featured Agency', 'opalestate-pro' ); ?>">
|
||||
<?php echo esc_html_e( 'Featured', 'opalestate-pro' ); ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $agency->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; ?>
|
||||
</header>
|
||||
|
||||
<div class="agency-body-content clearfix">
|
||||
<div class="agency-info">
|
||||
<div class="agency-logo">
|
||||
<?php $data = OpalEstate_Agency::get_link( get_the_ID() ); ?>
|
||||
|
||||
<img src="<?php echo esc_url( $data['avatar'] ); ?>" alt="<?php esc_attr_e( 'Agency avatar', 'opalestate-pro' ); ?>">
|
||||
</div>
|
||||
<div class="agency-content">
|
||||
<h6 class="agency-box-title text-uppercase">
|
||||
<?php the_title() ?>
|
||||
</h6><!-- /.agency-box-title -->
|
||||
<h3 class="agency-name hide"><?php the_title(); ?></h3>
|
||||
<p class="agency-address">
|
||||
<?php echo esc_html( $address ); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12 col-sm-12">
|
||||
|
||||
<?php
|
||||
if ( ! isset( $id ) ) {
|
||||
$id = get_the_ID();
|
||||
}
|
||||
$picture = '';
|
||||
?>
|
||||
<div class="property-agency-contact">
|
||||
<?php $is_sticky = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'sticky', true ); ?>
|
||||
<div class="agency-top-meta">
|
||||
<div class="agency-top-info">
|
||||
<?php the_title( '<h5 class="entry-title">', '</h5>' ); ?>
|
||||
<?php
|
||||
$slogan = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'slogan', true );
|
||||
?>
|
||||
<p class="agency-slogan"><?php echo esc_html( $slogan ); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
$facebook = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'facebook', true );
|
||||
$twitter = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'twitter', true );
|
||||
$pinterest = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'pinterest', true );
|
||||
$google = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'google', true );
|
||||
$instagram = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'instagram', true );
|
||||
$linkedIn = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'linkedIn', true );
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="agency-box-meta">
|
||||
|
||||
<?php $email = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'email', true ); ?>
|
||||
<?php if ( ! empty( $email ) ) : ?>
|
||||
<div class="agency-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><!-- /.agency-box-email -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $phone = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'phone', true ); ?>
|
||||
<?php if ( ! empty( $phone ) ) : ?>
|
||||
<div class="agency-box-phone">
|
||||
<i class="fa fa-phone"></i><span><a href="tel:<?php echo esc_attr( $phone ); ?>"><?php echo esc_attr( $phone ); ?></a></span>
|
||||
</div><!-- /.agency-box-phone -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $mobile = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'mobile', true ); ?>
|
||||
<?php if ( ! empty( $mobile ) ) : ?>
|
||||
<div class="agency-box-mobile">
|
||||
<i class="fa fa-mobile"></i><span><a href="tel:<?php echo esc_attr( $phone ); ?>"><?php echo esc_attr( $mobile ); ?></a></span>
|
||||
</div><!-- /.agency-box-phone -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $fax = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'fax', true ); ?>
|
||||
<?php if ( ! empty( $fax ) ) : ?>
|
||||
<div class="agency-box-fax">
|
||||
<i class="fa fa-fax"></i><span><?php echo esc_attr( $fax ); ?></span>
|
||||
</div><!-- /.agency-box-phone -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $web = get_post_meta( $id, OPALESTATE_AGENCY_PREFIX . 'web', true ); ?>
|
||||
<?php if ( ! empty( $web ) ) : ?>
|
||||
<div class="agency-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><!-- /.agency-box-web -->
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- /.agency-box-meta -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="opalestate-social-icons">
|
||||
<?php if ( $facebook && $facebook != "#" && ! empty( $facebook ) ) { ?>
|
||||
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $facebook ); ?>"> <i class="fa fa-facebook"></i> </a>
|
||||
<?php } ?>
|
||||
<?php if ( $twitter && $twitter != "#" && ! empty( $twitter ) ) { ?>
|
||||
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $twitter ); ?>"><i class="fa fa-twitter"></i> </a>
|
||||
<?php } ?>
|
||||
<?php if ( $pinterest && $pinterest != "#" && ! empty( $pinterest ) ) { ?>
|
||||
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $pinterest ); ?>"><i class="fa fa-pinterest"></i> </a>
|
||||
<?php } ?>
|
||||
<?php if ( $google && $google != "#" && ! empty( $google ) ) { ?>
|
||||
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $google ); ?>"> <i class="fa fa-google"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( $instagram && $instagram != "#" && ! empty( $instagram ) ) { ?>
|
||||
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $instagram ); ?>"> <i class="fa fa-instagram"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( $linkedIn && $linkedIn != "#" && ! empty( $linkedIn ) ) { ?>
|
||||
<a class="opalestate-social-white radius-x" rel="nofollow" href="<?php echo esc_url( $linkedIn ); ?>"> <i class="fa fa-linkedIn"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
17
templates/single-agency/gallery.php
Executable file
17
templates/single-agency/gallery.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
global $agency;
|
||||
$gallery = $agency->get_gallery();
|
||||
|
||||
if ( ! $gallery ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="opalestate-gallery">
|
||||
<h4 class="box-heading"><?php esc_html_e( 'Gallery', 'opalestate-pro' ); ?></h4>
|
||||
<div class="gallery-summery-style">
|
||||
<?php foreach ( $gallery as $key => $src ): ?>
|
||||
<a href="<?php echo esc_url( $src ); ?>" style="background-image:url('<?php echo esc_url( $src ); ?>')"></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
1
templates/single-agency/index.html
Executable file
1
templates/single-agency/index.html
Executable file
@@ -0,0 +1 @@
|
||||
index.html
|
||||
39
templates/single-agency/properties.php
Executable file
39
templates/single-agency/properties.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
global $post;
|
||||
|
||||
$agency_id = get_the_ID();
|
||||
$limit = apply_filters( 'opalesate_agency_properties_limit', 5 );
|
||||
$user_id = get_post_meta( $agency_id, OPALESTATE_AGENCY_PREFIX . 'user_id', true );
|
||||
|
||||
$query = Opalestate_Query::get_agency_property( $agency_id, $user_id , $limit );
|
||||
|
||||
|
||||
if( $query->have_posts() ) :
|
||||
$id = rand();
|
||||
?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="opalestate-message">
|
||||
<?php esc_html_e( 'My Agency has not any property yet.', 'opalestate-pro' ) ;?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
53
templates/single-agency/summary.php
Executable file
53
templates/single-agency/summary.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<div class="property-agency-contact">
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="property-agency-contact">
|
||||
<div class="agency-box">
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<div class="agency-box-image <?php if ( ! has_post_thumbnail() ) { echo 'without-image'; } ?>">
|
||||
<a href="<?php the_permalink(); ?>" class="agency-box-image-inner <?php if ( ! empty( $agency ) ) : ?>has-agency<?php endif; ?>">
|
||||
<?php the_post_thumbnail( 'agency-thumbnail' ); ?>
|
||||
</a>
|
||||
</div><!-- /.agency-box-image -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="agency-box-meta">
|
||||
|
||||
<?php $email = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'email', true ); ?>
|
||||
<?php if ( ! empty( $email ) ) : ?>
|
||||
<div class="agency-box-email">
|
||||
<a href="mailto:<?php echo esc_attr( $email ); ?>">
|
||||
<i class="fa fa-email"></i> <?php echo esc_attr( $email ); ?>
|
||||
</a>
|
||||
</div><!-- /.agency-box-email -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $phone = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'phone', true ); ?>
|
||||
<?php if ( ! empty( $phone ) ) : ?>
|
||||
<div class="agency-box-phone">
|
||||
<?php echo esc_attr( $phone ); ?>
|
||||
</div><!-- /.agency-box-phone -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $web = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'web', true ); ?>
|
||||
<?php if ( ! empty( $web ) ) : ?>
|
||||
<div class="agency-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="agency-box-title">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title() ?></a>
|
||||
</h3>
|
||||
<div class="content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
40
templates/single-agency/tabs.php
Executable file
40
templates/single-agency/tabs.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php $team = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'team', true ); ?>
|
||||
<div class="agency-tabs">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active">
|
||||
<a aria-expanded="false" href="#agency-properties" role="tab" class="tab-item">
|
||||
<span><?php esc_html_e( 'Properties', 'opalestate-pro' ); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a aria-expanded="true" href="#agency-team" class="tab-google-street-view-btn" role="tab" class="tab-item">
|
||||
<span><?php esc_html_e('Team','opalestate-pro'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a aria-expanded="true" href="#agency-review" class="tab-google-street-view-btn" role="tab" class="tab-item">
|
||||
<span><?php esc_html_e('Review','opalestate-pro'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade out active in" id="agency-properties">
|
||||
<?php echo opalestate_load_template_path( 'single-agency/properties' ); ?>
|
||||
</div>
|
||||
|
||||
<?php if( $team ): ?>
|
||||
<div class="tab-pane fade out" id="agency-team">
|
||||
<?php echo opalestate_load_template_path( 'single-agency/team' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( comments_open() || get_comments_number() ) : ?>
|
||||
<div class="tab-pane fade out" id="agency-review">
|
||||
<?php echo opalestate_load_template_path( 'single-agency/review' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
26
templates/single-agency/team.php
Executable file
26
templates/single-agency/team.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$team = get_post_meta( get_the_ID(), OPALESTATE_AGENCY_PREFIX . 'team', true );
|
||||
|
||||
if ( $team ) :
|
||||
$column = 2;
|
||||
$colclass = floor( 12 / $column );
|
||||
?>
|
||||
<div class="opalesate-agents opalestate-box">
|
||||
<?php if ( $team ): ?>
|
||||
<div class="row">
|
||||
<?php
|
||||
foreach ( $team as $user_id ):
|
||||
$agent_id = get_user_meta( $user_id, OPALESTATE_USER_PROFILE_PREFIX . 'related_id', true );
|
||||
?>
|
||||
<div class="col-lg-<?php echo esc_attr( $colclass ); ?> col-md-<?php echo esc_attr( $colclass ); ?> col-sm-<?php echo esc_attr( $colclass ); ?>">
|
||||
<?php echo opalestate_load_template_path( 'content-user-grid', [ 'user_id' => $user_id ] ); ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
<?php get_template_part( 'content', 'none' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user