<?php
$prev_post = get_previous_post();
$next_post = get_next_post();
if ( 1 == get_theme_mod('post_navigation_status') && ( get_next_post() || get_previous_post() ) ){ ?>
<div class="single-other-post clearfix">
    <?php if (!empty( $prev_post )){ ?>
    <div class="col-md-6 col-sm-6 col-xs-6">
        <div class="prev-post">
            <a href="<?php echo esc_url(get_permalink( $prev_post->ID )); ?>" class="btn-prev fa fa-angle-left" title="<?php echo esc_attr($prev_post->post_title); ?>">
            </a>
            <article class="entry-item">
                <div class="entry-thumb">
                    <a href="<?php echo esc_url(get_permalink( $prev_post->ID )); ?>" title="<?php echo esc_attr($prev_post->post_title); ?>">
                        <?php if(has_post_thumbnail($prev_post->ID )){
                        echo kopa_get_image($prev_post->ID,$prev_post->post_title,143,86,true);
                    }?>
                    </a>
                </div>
                <h4 class="entry-title"><a href="<?php echo esc_url(get_permalink( $prev_post->ID )); ?>" title="<?php echo esc_attr($prev_post->post_title); ?>"><?php echo esc_html($prev_post->post_title);?></a></h4>
            </article>
        </div>
    </div>
    <?php } ?>
    <?php if (!empty( $next_post )){ ?>
    <div class="col-md-6 col-sm-6 col-xs-6">
        <div class="next-post">
            <a href="<?php echo esc_url(get_permalink( $next_post->ID )); ?>" class="btn-prev fa fa-angle-right" title="<?php echo esc_attr($next_post->post_title);?>">
            </a>
            <article class="entry-item">
                <div class="entry-thumb">
                    <a href="<?php echo esc_url(get_permalink( $next_post->ID )); ?>" title="<?php echo esc_attr($next_post->post_title);?>">
                        <?php if(has_post_thumbnail($next_post->ID )){
                            echo kopa_get_image($next_post->ID,$next_post->post_title,143,86,true);
                        }?>
                    </a>
                </div>
                <h4 class="entry-title"><a href="<?php echo esc_url(get_permalink( $next_post->ID )); ?>" title="<?php echo esc_attr($next_post->post_title);?>"><?php echo esc_html($next_post->post_title);?></a></h4>
            </article>
        </div>
    </div>
    <?php } ?>
</div>

<?php }