<?php if ( is_singular( 'post' ) ) : // If viewing a single post page. ?>


<div class="post-nav">
    <?php if ( get_previous_post_link() ) : ?>
        <div class="nav-prev">
            <?php previous_post_link(
                '%link',
                '<div class="nav-text justify-content-sm-start max-lines"><i class="bi bi-chevron-double-left"></i><span>' . esc_html__( 'Previous Post', 'shobe' ) . '</span><h5>%title</h5></div>'
            ); ?>
        </div>
    <?php endif; ?>

    <?php if ( get_next_post_link() ) : ?>
        <div class="nav-next">
            <?php next_post_link(
                '%link',
                '<div class="nav-text justify-content-sm-end max-lines"><i class="bi bi-chevron-double-right"></i><div class=""><span>' . esc_html__( 'Next Post', 'shobe' ) . '</span><h5>%title</h5></div>'
                );
            ?>
        </div>
    <?php endif; ?>
</div><!-- .post-nav -->



<?php elseif ( is_home() || is_archive() || is_search() ) : // If viewing the blog, an archive, or search results. ?>

<?php the_posts_pagination( array( 
        'prev_text'  => __('<span class="bi bi-chevron-double-left"></span>Prev', 'shobe'),
        'next_text'  => __('Next<span class="bi bi-chevron-double-right"></span>', 'shobe'), 
        'type'      => 'list',
        ) ); ?>

<?php endif; ?>
