<?php
/**
 * The template for displaying Archive Testimonials pages
 */
get_header(); ?>

<div id="primary" class="content-area testimonialsarchive">
    <div id="content" class="site-content" role="main">

        <?php if ( have_posts() ) : ?>
            <?php theguard_hide_testim(); ?>
            
            <?php while ( have_posts() ) : the_post(); ?>
                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    <div class="entry-content">
                        <?php
                        $client_name = types_render_field("name-of-client", array("output"=>"normal"));
                        $client_post = types_render_field("post-of-client", array("output"=>"normal"));
                        $client_photo = types_render_field( "photo-of-client", array("url" => "true"));
                            echo '<div class="wrapper" data-anim="base wrapper">
                                        <a href="'.esc_url(get_permalink()).'"><img src="'.esc_url($client_photo).'" alt=""></a>
                                        <div class="circle" data-anim="base left"></div>
                                        <div class="circle" data-anim="base right"></div>
                                    </div>';
                        echo '<strong>'.esc_attr($client_name).'</strong>
                                  <p class="postname">'.esc_attr($client_post).'</p>';
                        ?>
                        <div class="mention">
                            <?php the_excerpt(); ?>
                        </div>
                    </div>
                </article><!-- #post -->


            <?php endwhile; ?>

            <?php theguard_paging_nav(); ?>

        <?php else : ?>
            <?php get_template_part( 'content', 'none' ); ?>
        <?php endif; ?>

    </div><!-- #content -->
</div><!-- #primary -->

<?php get_footer(); ?>
