asked 5 years ago

Dear Team,

The previous/next post underneath posts is not working properly: it gives posts, but it is not the previous or the next one, but older ones.

Another question: right now, the date of the article is visible to readers. How would I add the time in a similar way as BBC does this, where it says "18 minutes ago". Is this possible?

Cheers, Manya

1 Answers
answered 5 years ago

To resolve this issue, you can open the single.php file then find the following code:
<?php the_post_navigation(); ?>

And replace with the new code:

<nav class="navigation post-navigation" role="navigation">
                        <div class="nav-links">
                            <div class="nav-previous">
                                <?php previous_post('%', '', 'yes'); ?>
                            <div class="nav-next">
                                <?php next_post('%', '', 'yes'); ?>

Hope this helps!

Powered by DW Question & Answer Pro