<div class="container p-0 mt-3">
<div class="row single-next-prev-posts-container">
    <?php $prevPost = get_previous_post(true);
        if($prevPost) {
        $args = array(
        'posts_per_page' => 1,
        'include' => $prevPost->ID
        );
        $prevPost = get_posts($args);
        foreach ($prevPost as $post) {
        setup_postdata($post);
        ?>
        <div class="col-12 col-md-6 padrl-0">
            <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?>
            <figure class="single-next-prev-posts" style="background-image: url('<?php echo $thumb['0'];?>')">
              <a class="inner-card" href="<?php the_permalink(); ?>">
                <div class="ovl dg-overlay-horiz"></div>
                <div class="card-title color-FFF">
                  <div class="prev-text"><?php  __('Previous','digibe');  ?></div>
                  <i class="fa fa-arrow-right" aria-hidden="true"></i>
                  <span><?php the_title(); ?></span>
                </div>
              </a>
            </figure>
        </div>
    <?php
    wp_reset_postdata();
  } //end foreach
} // end if
$nextPost = get_next_post(true);
if($nextPost) {
  $args = array(
  'posts_per_page' => 1,
  'include' => $nextPost->ID
);
$nextPost = get_posts($args);
foreach ($nextPost as $post) {
setup_postdata($post); ?>
    <div class="col-12 col-md-6 padrl-0">
      <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );?>
      <figure class="single-next-prev-posts" style="background-image: url('<?php echo $thumb['0'];?>')">
        <a class="inner-card" href="<?php the_permalink(); ?>">
          <div class="ovl dg-overlay-horiz"></div>
          <div class="card-title color-FFF">
            <div class="next-text"><?php  __('next','digibe');  ?></div>
            <span><?php the_title(); ?></span>
            <i class="fa fa-arrow-left" aria-hidden="true"></i>
          </div>
        </a>
      </figure>
    </div>
    <?php   wp_reset_postdata();
  } //end foreach
} // end if
?>
</div>
</div>
