global $user, $options;
$instance['agents'] = array($user);
$instance['show_description'] = 'yes';
$instance['link_to_agent'] = $options['_est_agent_links'];
$show_email = get_post_meta(get_the_ID(), '_est_show_agent_email', true);
$show_phone = get_post_meta(get_the_ID(), '_est_show_agent_phone', true);
$instance['show_phone'] = empty($show_phone) ? 'yes' : $show_phone;
$instance['show_email'] = empty($show_email) ? 'yes' : $show_email;
$show_properties = (!empty($options['_est_show_properties']) and $options['_est_show_properties'] == 'hide') ? false : true;
$class = 'large-12';
if ($show_properties == true) {
    $class = 'large-8';
}
$show_without_properties = get_post_meta(get_the_ID(), '_est_show_agents_without_properties', true);
$show_without_properties = empty($show_without_properties) ? 'hide' : $show_without_properties;
$properties = est_get_agent_properties($user->ID);
if (!empty($properties) or $show_without_properties == 'show') {
    ?>


<div class='layout-agent-list'>
<div class='row'>
	<div class='<?php 
    echo $class;
    ?>
 small-12 columns'>
		<?php 
    the_widget('bshAgentContactWidget', $instance);
    ?>
	</div>
	<?php 
<?php

global $query_string, $wp_query;
get_header();
$author = get_user_by('slug', get_query_var('author_name'));
$author_page = get_author_posts_url($author->ID);
$properties = est_get_agent_properties($author->ID);
$temp_query = $wp_query;
$wp_query = null;
$paged = empty($_GET['page']) ? 1 : $_GET['page'];
$args = array('post_type' => 'property', 'post__in' => $properties, 'posts_per_page' => get_option('posts_per_page'), 'paged' => $paged);
$wp_query = new WP_Query($args);
?>


<div class='row mt44'>


	<div class='large-12 small-12 columns'>
		<div id='siteContent'>
			<div class='row'>

				<div class='columns large-12 small-12'>
					<?php 
echo '<div class="page-title mb22">';
$title = sprintf(__('%s\'s Properties', THEMENAME), $author->display_name);
echo do_shortcode('[title icon="home"]' . $title . '[/title]');
echo '</div>';
?>
				</div>