<?php global $asteria;?>&#13;
<div class="lay1"><amp-ad width="100vw" height="320" type="adsense" data-ad-client="ca-pub-6024983979000104" data-ad-slot="6512403466" data-auto-format="rspv" data-full-width="">&#13;
  <div overflow=""></div>&#13;
</amp-ad>&#13;
<div class="center">&#13;
&#13;
<?php if ( is_home() ) { ?>&#13;
    <div class="homeposts_title">&#13;
	<?php if (get_option( 'asteria' )) { ?><?php echo $asteria['posts_title_id']; ?><?php }else{?> &#13;
	<h2 style="text-align: center;"><span style="color: #e2341d;">Check Out Our Portfolio</span></h2>&#13;
	<p style="text-align: center;">The Very recent work for our clients</p>&#13;
	<?php } ?>&#13;
    </div>&#13;
<?php }?>&#13;
&#13;
<div class="lay1_wrap">&#13;
                   <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); ?>&#13;
                <div post_class> id="post-<?php the_ID(); ?>"&gt;          &#13;
&#13;
                <div class="post_image">&#13;
                    <div class="img_hover">&#13;
                        <div class="icon_wrap">&#13;
                        <div class="icon_round"><a href="&lt;?php%20the_permalink();?&gt;"><i class="fa-link fa-2x"></i></a></div>&#13;
                        </div>&#13;
                    </div>&#13;
                     <!--CALL POST IMAGE-->&#13;
                    <?php if ( has_post_thumbnail() ) : ?>&#13;
                    &#13;
                    <div class="imgwrap">                      &#13;
                    <a href="&lt;?php%20the_permalink();?&gt;"><?php the_post_thumbnail('asteriathumb'); ?></a></div>&#13;
                    &#13;
					<?php elseif($photo = asteria_get_images('numberposts=1', true)): ?>&#13;
                    <div class="imgwrap">                      &#13;
                    <a href="&lt;?php%20the_permalink();?&gt;"><?php echo wp_get_attachment_image($photo[0]->ID ,'medium'); ?&gt;</a></div>&#13;
                    &#13;
                    <?php else : ?>&#13;
                    <div class="imgwrap">&#13;
                    <a href="&lt;?php%20the_permalink();?&gt;"><img src="&lt;?php%20echo%20get_template_directory_uri();%20?&gt;/images/blank_img.png" alt="&lt;?php the_title_attribute(); ?&gt;" class="thn_thumbnail"></a></div>   &#13;
                             &#13;
                    <?php endif; ?>&#13;
                    <!--POST CONTENT-->&#13;
                    <div class="post_content">&#13;
                    <h2 class="postitle"><a href="&lt;?php%20the_permalink();?&gt;" title="&lt;?php the_title_attribute(); ?&gt;"><?php the_title(); ?></a></h2>&#13;
                	</div>&#13;
                    &#13;
                </div>&#13;
                        </div>&#13;
            <?php endwhile ?> &#13;
&#13;
            <?php endif ?>&#13;
</div>&#13;
&#13;
&#13;
&#13;
<!--PAGINATION START-->&#13;
<div class="ast_pagenav">&#13;
	<?php global $wp_query;
        $big = 999999999; // need an unlikely integer
            echo paginate_links( array(
                'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),&#13;
                'format' =&gt; '?paged=%#%',&#13;
                'current' =&gt; max( 1, get_query_var('paged') ),&#13;
                'total' =&gt; $wp_query-&gt;max_num_pages,&#13;
                'show_all'     =&gt; true,&#13;
                'prev_next'    =&gt; false&#13;
            &#13;
            ) );&#13;
    ?&gt;&#13;
</div>&#13;
<!--PAGINATION END-->&#13;
&#13;
<?php wp_reset_query(); ?>&#13;
    </div>&#13;
    </div>