<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}
get_header();
?>
<div class="container">
    <div class="row">
        <div class="<?php echo esc_attr(tfre_get_option('archive_agent_sidebar') == 'enable' ? 'col-md-8' : 'col-md-12'); ?>">
            <div id="primary" class="content-area">
                <main id="main" class="site-main">
                    <?php while (have_posts()) :
                        the_post();
                    ?>
                    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
                        <div class="entry-content">
                            <?php do_action('tfre_single_agent_summary'); ?>
                        </div>
                    </article>
                    <?php endwhile;?>
                </main>
            </div>
        </div>
        <?php if (tfre_get_option('archive_agent_sidebar') == 'enable'): ?>
            <div class="agent-search-inner col-md-4">
                <div class="tfre_sidebar">
                <?php if (is_active_sidebar('archive-agent-sidebar')) { ?>
                    <?php dynamic_sidebar('archive-agent-sidebar'); ?>
                <?php } ?>
                </div>
            </div>
        <?php endif; ?>
    </div>
</div>

<?php get_footer(); ?>