How to use Thumbnails with Previous and Next Post Links in WordPress
One of our users asked us on our Facebook page: How to use thumbnails for previous/next post navigation in WordPress. The next_post_link and previous_post_link functions doesn’t have a simple enough thumbnail parameter which a new developer can simply turn on and off. In this article, we will show you how to use post thumbnails with previous and next post links in WordPress.
Quick Tip: Next and Previous Posts With Thumbnails
Media rich content is engaging content, right? And giving readers an opportunity to browse through posts linearly is one good way to keep them at your site reading longer, right? So why just give them a title? This quick tip will give you the programming you need to include the post thumbnail and the date of the next and previous posts. Styling is left up to you.
How to Add Next and Previous Posts Links in WordPress?
So we can have the following function added to the child theme template file functions.php to show these two post links in a single post page. In a page (is_page), these two navigation functions will not work and that is why we need to use is_single() function to exclude other singular pages e.g. is_page() or is_attachment().