<div class="posts-one-row">
                <?php 
$i = 1;
//The Loop
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $video_link = get_post_meta($post->ID, 'tk_video_link', true);
        $slide_images = get_post_meta($post->ID, $prefix . 'repeatable', true);
        $embed_code = wp_oembed_get($video_link, array('width' => 804));
        $images = '';
        if (!empty($slide_images)) {
            foreach ($slide_images as $slide) {
                if ($slide != '') {
                    $images .= '<img src="' . tk_get_thumb_new(804, 330, $slide) . '"/> ';
                }
            }
        }
        ?>

            <div class="blog-one-post">
            
                <div class="blog-post-title"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></div>
if ($the_query->have_posts()) {
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $post_category = wp_get_post_terms($post->ID, 'ct_portfolio');
        $isotop_cat = '';
        foreach ($post_category as $cat_id) {
            $isotop_cat .= ' class-' . $cat_id->term_id;
        }
        if ($i == 4) {
            $nomargin = 'nomargin';
        } else {
            $nomargin = ' ';
        }
        $slide_images = get_post_meta($post->ID, $prefix . 'repeatable', true);
        if (!empty($slide_images)) {
            $images_src = tk_get_thumb_new(212, 140, $slide_images[0]);
        }
        $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
        ?>


                        <div class="portfolio_box <?php 
        echo $isotop_cat . ' ' . $nomargin;
        ?>
 isotope-item" >                      
                            <div class="portfolio_image_bg_3 portfolio_box_categories">
                                <div class="page-image-center">
                                    <span class="page-image">
                                        <?php 
        if (has_post_thumbnail()) {
            ?>