Created
September 18, 2015 18:12
-
-
Save contempoinc/db0e73a65c54bddeeb7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Agents | |
* | |
* @package WP Real Estate 6 | |
* @subpackage Template | |
*/ | |
global $ct_options; | |
$inside_page_title = get_post_meta($post->ID, "_ct_inside_page_title", true); | |
get_header(); | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
?> | |
<?php if($inside_page_title == "Yes") { ?> | |
<div id="page-header" class="marB40"> | |
<div class="container"> | |
<h2 class="left"><?php the_title(); ?></h2> | |
<?php ct_breadcrumbs(); ?> | |
<div class="clear"></div> | |
</div> | |
</div> | |
<?php } ?> | |
<?php echo '<div class="container marT30">'; | |
if($ct_options['ct_layout'] == 'left-sidebar') { | |
get_sidebar(); | |
} ?> | |
<article class="col span_9 <?php if($ct_options['ct_layout'] == 'right-sidebar') { echo 'first'; } ?>"> | |
<div <?php if($ct_options['ct_layout'] == 'left-sidebar') { post_class('col span_12'); } else { post_class('col span_11 first'); } ?>> | |
<?php the_content(); ?> | |
<ul> | |
<?php | |
global $wpdb; | |
$query = "SELECT ID, user_nicename from $wpdb->users ORDER BY user_nicename"; | |
$author_ids = $wpdb->get_results($query); | |
$author_page_url = $curauth->user_url; | |
foreach($author_ids as $author) : $curauth = get_userdata($author->ID); | |
if($curauth->user_level >= 0 && $curauth->user_level != 10) : $user_link = get_author_posts_url($curauth->ID); ?> | |
<li class="agent"> | |
<?php if($curauth->ct_profile_url) { ?> | |
<figure class="col span_3 first"> | |
<img class="author-img" src="<?php echo $curauth->ct_profile_url; ?>" /> | |
</figure> | |
<?php } ?> | |
<div class="author-info col span_9"> | |
<h3><a href="<?php echo $user_link; ?>" title="<?php echo $curauth->display_name; ?>"><?php echo $curauth->display_name; ?></a></h3> | |
<?php if ($curauth->title) { ?><h5 class="position"><?php echo $curauth->title; ?></h5><?php } ?> | |
<?php if($curauth->mobile) { ?><p class="marT10 marB3"><i class="icon-phone"></i> <?php echo $curauth->mobile; ?></p><?php } ?> | |
<?php if($curauth->office) { ?><p class="marB3"><i class="icon-home"></i> <?php echo $curauth->office; ?></p><?php } ?> | |
<?php if($curauth->fax) { ?><p class="marB3"><i class="icon-print"></i> <?php echo $curauth->fax; ?></p><?php } ?> | |
<?php if($curauth->user_email) { $email = $curauth->user_email; ?><p class="marB6"><i class="icon-envelope"></i> <a href="mailto:<?php echo antispambot($email,1 ) ?>"><?php _e('Email', 'contempo'); ?></a></p><?php } ?> | |
<?php if($curauth->brokername) { ?><p class="marB3"><strong><?php echo $curauth->brokername; ?></strong></p><?php } ?> | |
<?php if($curauth->brokernum) { ?><p class="marB3"><?php echo $curauth->brokernum; ?></p><?php } ?> | |
<?php if($curauth->tagline) { ?><p class="tagline"><?php echo $curauth->tagline; ?></p><?php } ?> | |
<p><?php $bio = $curauth->description; echo nl2br($bio); ?></p> | |
<ul class="agent-social marL0"> | |
<?php if ($curauth->twitterhandle) { ?><li class="twitter"><a href="http://twitter.com/#!/<?php echo $curauth->twitterhandle; ?>" target="_blank"><i class="icon-twitter"></i></a></li><?php } ?> | |
<?php if ($curauth->facebookurl) { ?><li class="facebook"><a href="<?php echo $curauth->facebookurl; ?>" target="_blank"><i class="icon-facebook"></i></a></li><?php } ?> | |
<?php if ($curauth->linkedinurl) { ?><li class="facebook"><a href="<?php echo $curauth->linkedinurl; ?>" target="_blank"><i class="icon-linkedin"></i></a></li><?php } ?> | |
<?php if ($curauth->gplus) { ?><li class="google"><a href="<?php echo $curauth->gplus; ?>" target="_blank"><i class="icon-google-plus"></i></a></li><?php } ?> | |
</ul> | |
<p class="marB0"><strong><a class="btn" href="<?php echo $user_link; ?>" title="<?php echo $curauth->display_name; ?>"><?php _e('View all listings', 'contempo'); ?></a></strong></p> | |
</div> | |
<div class="clear"></div> | |
</li> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</ul> | |
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'contempo' ) . '</span>', 'after' => '</div>' ) ); ?> | |
<?php endwhile; endif; wp_reset_query(); ?> | |
<div class="clear"></div> | |
</div> | |
</article> | |
<?php if($ct_options['ct_layout'] == 'right-sidebar') { | |
get_sidebar(); | |
} | |
echo '<div class="clear"></div>'; | |
echo '</div>'; | |
get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment