WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] YARPP display on Pages: is_single and is_singular (4 posts)

  1. demetris
    Member
    Posted 3 years 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, :-D 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!

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. gbccares
    Member
    Posted 3 years 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?

  3. affiliateTT
    Member
    Posted 3 years ago #

    Hi Demetris,

    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.

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    You could alternatively just add the code related_posts() to your single.php file to manually trigger display.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic