A simple tweak for the WordPress YARPP plugin

Post image for A simple tweak for the WordPress YARPP plugin

by bledsoe on August 16, 2009

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."

BeforeAfter

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:

YARPPnospace

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

Related posts:

  1. How to align your custom header with your navbar
  2. Removing the whitespace at the top of your Thesis blog
  3. Merging WordPress blogs
  4. How to add clickable icons to your WordPress sidebar
  5. Using categories and permalinks on your blog: A simple approach

{ 2 comments… read them below or add one }

Agus Suhanto August 24, 2010 at 9:33 pm

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:

http://suhanto.net/yarpp-template-post-thumbnails/

Bollywood Actress September 1, 2010 at 1:59 pm

Thanks for the tweak, Will try it on my sites.
Bollywood Actress´s last blog ..Hrithik Roshan after the success of his film KitesMy ComLuv Profile

Previous post:

Next post: