WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Yet Another Related Posts Plugin] YARPP display on Pages: is_single and is_singular

[Plugin: Yet Another Related Posts Plugin] YARPP display on Pages: is_single and is_singular

  • demetris

    @demetris

    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!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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?

    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.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] YARPP display on Pages: is_single and is_singular’ is closed to new replies.