[resolved] [Plugin: Yet Another Related Posts Plugin] remove Yarpp for specific posts (2 posts)

  1. neologan
    Posted 6 years ago #

    Just wanted to post this in case it might help someone else.

    I wanted a way to remove the related posts that yarpp inserts for any specific post i so choose, to which Mitch replied with this handy solution:

    Normally, when you want to place the related post box anywhere, you'd use:

    <?php related_posts(); ?>

    Common use would be to place this in singles.php (make sure you uncheck "Automatically display related posts?" in the plugin options.

    instead, use:

    <?php if (!get_post_custom_values('hide_yarpp'))
                 related_posts(); ?>

    then go to add post (or edit) and add the Custom Field "hide_yarpp", set any value to this and it will now hide the related posts for this specific post.

    Niche, yes, but i needed this, so someone else might, too.

    Thanks to Mitch :)

  2. @neologan thanks for posting it here! I'm sure this could be helpful for others as well. :)

Topic Closed

This topic has been closed to new replies.

About this Topic