<nav>
    <ul class="pagination">
        <li class="page-item p-2">
            <?php previous_posts_link(); ?>
        </li>
        <li class="page-item p-2">
            <?php next_posts_link(); ?>
        </li>
    </ul>
</nav>
