YARPP (Yet Another Related Posts Plugin) for WordPress is a great related posts plugin. With one of my recent products, Scroll Checkpoint, I wanted to create an example of a recent posts sliding dialog with featured image thumbnails, and decided on YARPP as my best solution.
YARPP 3 includes a wonderfully extensible template system that allows you control the details of how related posts are displayed. I was able to create just the look I wanted, and I decided it would be worth sharing this template so that others could make use of it.
The code is in 3 parts:
- functions.php – The code that registers the features image size we’ll use in the template
- yarpp-template-thumbnail.css – The styles used in the Scroll Checkpoint demo – of course, these can be modified and added to any stylesheet.
- yarpp-template-thumbnail.php – The actual template, which creates the HTML for each related post.
All the code is available in its entirety on GitHub’s gist (click Code above).
Enjoy!