Teacher and coach

A simple tweak for the WordPress YARPP plugin

Someone recently asked me to make a small change to the Yet Another Related Posts Plugin (YARPP) which she had recently added to her WordPress site.  (For each of your published posts, YARPP will display a list of related posts, the idea being that if readers enjoyed the post they just read, they might want to read a related post as well.)

YARPPspaceThe desired change was simply to remove the blank line between the “Related posts” heading and the first related post.  It turns out that this can be done by inserting some code in the YARPP settings page, but unless you’re somewhat familiar with CSS, it’s not immediately obvious what code to insert.  Here’s what you do:

After you install YARPP, click on the “Related Posts (YARPP)” link under the Settings heading in the left sidebar.  On the YARPP settings page, scroll down to the “Display options for your website” section about halfway down and find the heading that says “Before/after related entries.”


The first box next to this heading contains an opening paragraph tag (<p>) and you want to add some CSS code to make that tag look like this:

<p style="margin-bottom:0;">

Click the “Update options” button at the bottom of the screen and your list of related posts will now look like this:


[If you’re interested in more details on how this little bit of CSS works its magic, take a look here and here.]

3 Responses to “A simple tweak for the WordPress YARPP plugin”

  1. venkat says:

    How can we display the related posts when only custom filed is set to a page.
    Is it possible to share code .

  2. Thanks for the tweak, Will try it on my sites.

  3. Agus Suhanto says:

    I also have a post about YARPP template hack or technique. My post is related with YARPP and post-thumbnails: how we can create a YARPP template with post-thumbnails:


Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress | Designed by Elegant Themes