<?php
/**
 * Created by PhpStorm.
 * User: marco
 * Date: 26/11/18
 * Time: 10.21
 */ ?>
<?php $subs_args = array(
    'post_type' => 'testimonial_post',
    'posts_per_page' => 999,
    'orderby' => 'title',
    'order' => 'asc'
);
$the_query = new WP_Query($subs_args);
if ($the_query->have_posts()) :


    while ($the_query->have_posts()) : $the_query->the_post();
        $image = get_the_post_thumbnail_url(get_the_ID());

        $col = 'col-md-12';
        if (!empty($image)) {
            $col = 'col-md-10';
        }


        ?>
        <div class="blok testimonial-row">
        <div class="row">
            <?php if (!empty($image)): ?>
                <div class="col-md-2">
                    <div class="blok img-responsive-container testimonial-img">
                        <img src="<?php echo $image; ?>"/>
                    </div>
                </div>
            <?php endif; ?>
            <div class="<?php echo $col; ?>">
                <div class="blok testimonial-content testimonial-content-single">
                    <?php the_content(); ?>
                </div>
            </div>
        </div></div>
    <?php endwhile;endif; ?>

