Support » Plugin: Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] YARPP display on Pages: is_single and is_singular
6 years, 6 months ago
I was playing with YARPP today and was wondering why it did not show up on Pages (that is, posts of type “page”).
I searched the plugin files for is_single() and, without actually reading any of the surrounding code, 😀 I just replaced the two instances found in includes.php with is_singular().
Now YARPP shows up on Pages too.
is_singular() returns TRUE if any of is_single(), is_page(), or is_attachment() return TRUE. That is, it’s the same as:
(is_single() or is_page() or is_attachment())
I just thought I’d let you know.
Thank you for YARPP and for the time you’ve put into it!
6 years, 4 months ago
I was able to get this working for pages, but it is always cutting off the bottom link. So if I have 8 posts in the category it will only show 7, or if I have 3 it will only show 2. It’s accross the board on every page missing one link. Any help?
I was having problem having the YARPP to display related Pages, can you elaborate how you change the includes.php file to get it to work?
For e.g. what exactly did you add in the includes.php and where it is?
Many thanks in advance.
6 years, 3 months ago
You could alternatively just add the code related_posts() to your single.php file to manually trigger display.