— Patrick Galbraith

Recent Posts Plus (WordPress Widget)

An advanced version of the WordPress Recent Posts widget, allows display of thumbnails, post excerpt, author, comment count, and more. Provides options to trim the title and override the post order and type. Also includes a simple template parser so you can override the default output.

Download: http://wordpress.org/extend/plugins/recent-posts-plus


1: Title

Default: Recent Posts

This field sets the title of the widget. It works the same as every other widget.

2: Number of posts

Default: 5

Changes how many posts are displayed in the widget. Enter '-1' to display all posts.

3: Include post thumbnail

Default: no

Displays the post thumbnails of each post.

If this option is hidden you may not have a theme with post-thumbnails enabled. You can manually enable and add post-thumbnails to each post or you can download the Default Thumbnail Plus plugin automatically display a default image.

4: Include post excerpt

Default: no

Displays the post excerpt of each post.

5: Show expert options

Default: no

Show/hide the expert options panel. These options should be used with more care.

6: Limit post title

Default: (no limit)

Limits the numbers of characters or words to display of each posts title.
Example: For the post title "Look at this title" setting this option to 7 chars would result in "Look at..."

7: Limit post excerpt

Default: (no limit)

Limits the numbers of characters or words to display of each posts excerpt.

8: Limit ellipsis

Default: ...

Sets the string to append to post titles or excerpts that have been shortened.

9: Post date format

Default: M j

Sets the PHP date format to use when displaying the post date.
See http://php.net/manual/en/function.date.php for overview of the options available.

Note: the date format can be overriden in the output template, which allows for multiple date formats in one entry, see section "12: Widget output template".

10: Thumbnail size

Default: 50 x 50

Sets the size of the post thumbnail in pixels.

11: WP_Query options

This is an advanced option that modifies what posts are shown in the widget. This option specifies extra arguments to use in the WP_Query request and as such is very flexible even allowing this widget to show pages rather than posts, show oldest posts first, or filter posts by tag or category. The WP_Query options must be specified in valid JSON format (validate here http://jsonlint.com/).

These are the default args that are sent to WP_Query:

"post_type": "post",
"posts_per_page": <same as Number of posts setting>, 
"orderby": "date",
"order": "DESC"


List of options:

"post_type": "post", //post, page, revision, attachment, any
"post_status": "publish", //publish, pending, draft, auto-draft, future, private, inherit, trash, any.
"posts_per_page": "5", //overrides number of posts setting
"offset": "3", //number of posts to skip over 
"post__in": [2, 3, 4], //only show posts 2, 3 and 4
"post__not_in": [2, 3, 4], //exclude posts 2, 3 and 4
"ignore_sticky_posts": "1", //ignore sticky posts or not. Default value is 0, don't ignore (requires WordPress 3.1+).
"caller_get_posts": "1", //ignore sticky posts or not. Deprecated as of Version 3.1 in favor of 'ignore_sticky_posts'.
"author": "1", //author ID
"author_name": "john", //post author's name, use 'user_nicename' (NOT name)
"orderby": "date", //none, ID, author, title, date, modified, parent, rand, comment_count, meta_value, meta_value_num  
"order": "DESC", //ASC or DESC
"tag": "cooking,baking", //display posts that have "either" of these tags
"tag": "bread+baking+recipe", //display posts that have "all" of these tags
"tag_id": "13",
"cat": "1, 2, -3", //category ID 1, 2 but not 3
"category_name": "articles,news",
"year": "2011",
"meta_query" : [] //see below

For a full listing see http://codex.wordpress.org/Class_Reference/WP_Query

Ordering by custom fields

You can change the sort order to be based on a specified custom field using meta_value and meta_value_num as the orderby option.

Note: The difference between meta_value and meta_value_num is that the meta_value_num is sorted as a numeric value (i.e. meta_value would be ordered as a string e.g. 1, 3, 34, 4, 56, 6 whereas meta_value_num would be 1, 3, 4, 6, 34, 56).

The following example would order posts by custom field rating showing in order of highest rated to lowest rated.

     "meta_key" => "rating",
     "order": "DESC",
     "orderby": "meta_value_num"


Utilizing the meta_query option

Note: This option requires WordPress 3.1+

Filter or show posts with a certain custom field value using the meta_query option.

The following example would display posts with a custom field called mood with a value of happy:

    "meta_query": [
           "key": "mood", //Custom field key
           "value": "happy", //Custom field value
           "type": "CHAR", //Custom field type. Possible values are 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'
           "compare": "=" //Operator to test. Possible values are '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'

The following example would display posts if they have a custom field rating of between 5 and 10 or if they have a custom field mood with a value of happy:

    "meta_query": {
        "relation": "OR", //Possible values are 'AND', 'OR'
        "0": {
            "key": "rating",
            "value": [5, 10],
            "type": "NUMERIC",
            "compare": "BETWEEN"
        "1": {
            "key": "mood",
            "value": "happy",
            "type": "CHAR",
            "compare": "="


12: Widget output template

This is an advanced option that modifies the output of the widget. You can modify the output with template tags and add custom classes or tags for styling.

By default the widget outputs posts in this format:

<a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>

You can modify the output by including the following template tags:

{ID} The post ID
{THUMBNAIL} The post thumbnail IMG tag if it exists, otherwise nothing
{TITLE_RAW} The post title
{TITLE} The post title, will be trimmed if it exceeds "Option 6: Limit post title chars"
{EXCERPT_RAW} The post excerpt
{EXCERPT} The post excerpt, will be trimmed if it exceeds "Option 7: Limit post excerpt chars"
{PERMALINK} The post permalink url
{DATE} The post date, the format is defined by the "Option 9: Post date format" setting
{DATE[php_date_format]} As of 1.0.4: Customized date format which overrides the default date format setting. E.g. {DATE[l jS F Y]} would display like "Monday 1st January 2011"
{AUTHOR} The post author name
{AUTHOR_LINK} The post author website url
{AUTHOR_AVATAR} As of 1.0.7: Displays the author's avatar if available
{COMMENT_COUNT} The total number of comments, Trackbacks, and Pingbacks for the post
{META[name]} As of 1.0.5: Displays the value of the specified custom field. E.g. {META[Currently Reading]} or {META[Rating]}. Note: Only returns the first result.
{ELLIPSIS}...{/ELLIPSIS} As of 1.0.9: Overrides option "8: limit ellipsis" for the excerpt. 
                         You can use other templates tags within the {ELLIPSIS} tags but not PHP and it will only be appended to the excerpt if it is truncated. 
                         Example: {ELLIPSIS}... <a href="{PERMALINK}">(more)</a>{/ELLIPSIS}


Using raw PHP in the Widget output template

As of 1.0.7 you can add raw PHP code to the widget output template.

Note: This will require the PHP code you enter to be run though eval which will likely have a small performance penalty. However if you don't enter any PHP code eval will not be run. Be careful not to give untrusted users permission to modify widget settings since it could be a potential security risk.

The following example displays the author's avatar at 32px size:

<?php echo get_avatar(get_the_author_meta('user_email'), 32); ?>
<a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>

You can access some of the existing template tag values with the $widget_ouput_template_params array e.g. $widget_ouput_template_params['{ID}'] contains the current posts ID.


Examples of Styling the Output

The look of the widget output depends a lot on what theme you are using. By default the output looks somewhat like the image below. Thankfully we can improve this with very little effort and a few additions to your themes stylesheet.

The first thing you need to do is go to Appearance -> Editor and select the Stylesheet option on the right (it should be selected by default but just make sure). After that paste one of the following styles at the bottom of the stylesheet depending on the look you want.

Note these are just basic examples you can do a lot more with more with CSS. These examples also depend a lot on the theme you are using, more complex themes may require additional styling. Hopefully these examples can point you in the right direction.

.widget_recent_entries li {
    clear: both;
    margin: 5px 0;
.widget_recent_entries .wp-post-image {
    vertical-align: text-top;
    margin: 0 5px 0 0;


.widget_recent_entries li {
    clear: both;
    margin: 15px 0;

.widget_recent_entries .wp-post-image {
    float: left;
    margin: 0 5px 0 0;

.widget_recent_entries li p {
    margin-top: 5px;
    color: #707070;


.widget_recent_entries li {
    margin: 5px 0;

.widget_recent_entries .wp-post-image {
    vertical-align: middle;
    margin: 0 5px 0 0;

The above example has the thumbnail size set to 25px x 25px.

.widget_recent_entries li {
    margin: 10px 0;
    text-align: center;

.widget_recent_entries .wp-post-image {
    margin: 0 5px 0 0;

.widget_recent_entries li a {
    display: block;

The above example has the thumbnail size set to 100px x 100px.

Related Posts

  1. CJ says: August 16, 20118:28 am


    I went through and added a second date field so you can separate formats, like month on top and day on bottom. Like http://yourwebsiteforless.com/mysite2/ in right sidebar.

    I can send it over if you want it.


    • patrick says: August 16, 201110:04 am

      Hi CJ that would be great if you can send it through I will incorporate it into the next update.
      Also that way you won't have to hack every revision. Let me know if there are any other fields you might need.

  2. patrick says: August 16, 201111:49 am

    Hi CJ I just updated the plugin to v1.0.4 and added a custom date format feature. This should be more flexible than just adding extra date format fields as it allows for any number of custom date formats.
    How it works is specifying {DATE} in the template will display with the date format defined in section 9 "Post date format". However you can override this by using {DATE[php_date_format]} and specify your own custom format.
    So you could do {DATE[M]} to display "Aug" and {DATE[d]} to display "15" which is the day of the month.

  3. CJ says: August 17, 20114:06 am

    Awesome, that works better then what I did. The only other field I am having to create is a read more link. Awesome plugin by the way. I have been looking for something like this as I have a client that continually uses a similar format to what is in that site, and I was having to write it out by hand each time so I was about to create a plugin for it but you saved me lots of time :). Thanks a bunch.

    Do you accept donations?

    • Patrick says: August 17, 201110:59 am

      You should be able to create the read more link with the existing options.
      Like this:
      <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>
      {EXCERPT} <a href="{PERMALINK}">Read more</a>

    • Patrick says: August 17, 201111:49 am

      Actually looking at your site I would suggest something like this:
      <li class="news">
        <div class="inthenews">{DATE[M]}<span class="date">{DATE[d]}</span></div>
        <div class="news-content"><a title="{TITLE_RAW}" href="{PERMALINK}"><strong>{TITLE}</strong></a>
          <p>{EXCERPT} <a href="{PERMALINK}">Read more</a></p>

      I think it makes more sense semantically to use <LI> rather than <DIV> as the container since you are representing a list of items (in this case posts).

  4. CJ says: August 19, 20113:13 am

    Awesome.. Thanks for your help!

  5. Michele says: August 23, 201112:45 am

    Thank you for such a great plugin. I want to thank you specifically for making it so easy to change the way the output displays. Instead of having to figure out what the names of the CSS styling are and where the heck the files are, you've included the code right within the settings. Yippee! Oh, how I wish every plugin did that!

  6. cnng says: August 23, 20119:41 am

    I would like to add a "Read More" text below the excerp. How can I do that? Please help.
    The website address is http://sevendwarfspreschool.ca/setup/

  7. Patrick says: August 23, 201110:26 am

    Hi Cnng,
    See my above comment you can do it by adding the code below to the Widget output template
    <a href="{PERMALINK}">Read more</a>
    Edit: Looks like you already figured it out and updated your site.

  8. Juancho says: August 25, 20114:06 pm

    Very good plugin! YEAH! Thanks!

  9. Carolyn Shearlock says: August 27, 20115:35 am

    I'm obviously not understanding how to edit the WR-Query options. If I have nothing in the box, EXACTLY what do I put so that the sticky posts are not shown?

    Thanks -- it's doing exactly what I want otherwise. I was able to customize the output as I wanted, just not the query.

    • Patrick says: August 27, 20118:44 am

      Hi Carolyn,
      To modify the WP-Query to remove sticky posts you enter this:
      "ignore_sticky_posts": "1"

      To make the thumbnail a link just do this:
      <a title="{TITLE_RAW}" href="{PERMALINK}">{THUMBNAIL}</a>
      I haven't had a chance to try it since I'm on my phone but it should work fine.

  10. Carolyn Shearlock says: August 27, 20117:30 am

    Sorry, one more question .. .

    What would the output code look like to make the thumbnail clickable? I feel like I should be able to figure it out on my own, but I'm not getting it.


  11. Carolyn Shearlock says: August 27, 201111:24 am

    Patrick --

    Thanks for the really fast response. The clickable image works perfectly.

    The ignore sticky posts is still a problem. That's what I entered originally, and I copied and pasted your code. I still get the sticky. My theme is Atahualpa -- is that by any chance causing the problem? Is there another place to put the code, maybe in the plugin file?

    Thanks for helping, I really appreciate it!


    • Patrick says: August 27, 20113:15 pm

      Strange I doubt it is the theme, try removing the quotes from the value like this:
      "ignore_sticky_posts": 1

      Here is the documentation for that option from the WordPress Codex, note it will still show the stickied post but it won't place them at the beginning. If you are looking to exclude those posts then use "post__not_in".

      "ignore_sticky_posts (bool) - ignore sticky posts or not. Default value is 0, don't ignore. Ignore/exclude sticky posts being included at the beginning of posts returned, but the sticky post will still be returned in the natural order of that list of posts returned."

      I'm away on business until Monday so I can't really test anything on my end until then.

  12. Carolyn Shearlock says: August 27, 20119:34 pm

    It's still showing at the beginning of the list (it was one of my first posts, not at all recent). No problem with waiting until you're back.

    Thanks for the help!


    • Patrick says: August 27, 201110:40 pm

      I will figure out what the issue is when I get back.
      Just a little thing what version of WordPress are you running? The ignore_sticky_posts option was added in WordPress 3.1

  13. Carolyn Shearlock says: August 28, 201112:19 am

    That explains it. I'm on 3.0.1. Could I use the post_not_in to exclude it (it's the only Uncategorized post I have . . .)? If so, what would be the code?

    Second question . . . any chance you'd ever write a "matching" widget for random posts? I'd love to have one to highlight older content (most of mine is evergreen) but want it to have consistent styling with the recent posts.

    Thanks for figuring out the problem when you're off doing other stuff!

    • Patrick says: August 29, 201110:25 am

      The code prior to WordPress 3.1 to ignore sticky posts is:
      "caller_get_posts": 1

      To make it into a random posts widget just add:
      "orderby": "rand",
      "caller_get_posts": 1

  14. Carolyn Shearlock says: August 30, 201112:54 am

    Thanks so much! The caller_get_posts works perfectly.

    I'm going to have to work a little on the random posts as it's not formatting correctly (it may be that some of the older posts don't have the featured image and excerpt set, have to check . . )-- but that's going to be in a day or two as I'm working on a deadline for another project today and tomorrow.

    Thanks again and I'm sending a small donation!

  15. Stacie says: September 1, 20118:29 pm

    I am too new at all this and have never had anything to do with web design before. Anyway I have just set up my website and really like this pluggin however when i click to read onw of the recent posts the pluggin itself then shows a lot of coding in the sidebar (I apologise if i am being completely stupid) however i would greatly appreciate if someone could tell me how to fix this. Thanks so much

    • Patrick says: September 1, 20119:22 pm

      Hi Stacie,
      Sure I can help you that is no problem but I will need some more information.
      What version of WordPress are you running?
      Edit: Just saw the problem on your website (jsrcharteredaccountants.com). It seems to be an issue with your theme (zeeBusiness) I'm going to do some testing and will post back here when I figure out the issue.
      UPDATE: The issue is caused by a conflict with the Sharebar plugin. You can temporarily fix the issue by unchecking the "Include post excerpt" option.
      Basically the Sharebar plugin is adding code to the post excerpt but the tags are getting stripped so it is just showing the code in plain text. Due to limitations with the way WordPress handles post excerpts this could be a little tricky to fix on my end but I will have another look.

  16. Hal says: September 1, 201110:37 pm

    We can't get the "Expert Options" to work on our site. We're using WP 3.2.1 with the Genesis Theme Framework. Regardless of the query options we use, we get the same results, the most recent 5 posts. We want to display just one author's posts or just one category of posts. Here's the query code:
    "cat": "35",
    "posts_per_page": ,
    "orderby": "date",
    "order": "DESC"

    The category has exactly 4 posts in it. All are the most recent posts. When displaying it includes those posts plus the next most recent post in another category. When changing the category ID to a category with five entries we still get the most recent 5 entries and none of the older posts in the other category.

    The same holds for "author". We get the same 5 most recent posts as results including posts from different authors. Here's the page where we're using your plugin

    Any advice?


  17. Hal says: September 1, 201110:44 pm

    Weird, when I pasted the code above it didn't include the value for posts_per_page.
    Here's the correct query code
    "cat": "35",
    "posts_per_page": ,
    "orderby": "date",
    "order": "DESC"

    • Patrick says: September 1, 201111:24 pm

      Hi Hal,
      Try just this to set the category
      "cat": "35"

      and this to set the author:
      "author": "1"

      Or you can do both like this:
      "author": "1",
      "cat": "35"

      Also try posting your WP_Query code into http://jsonlint.com/ to make sure it is in valid JSON format, it looks like you have an invalid quote character.
      Then you can change the number of posts with option "2: Number of posts to show"

  18. Stacie says: September 2, 201112:36 am

    Thank you I appreciate your help on this (To be honest this is all totally new to me) My version is WordPress 3.2.1. Thank you again. I have unchecked that box but I had quite liked the 'preview' showing but at least this fixes it temporarily

    Regards Stacie

    • Patrick says: September 6, 201112:48 pm

      Hi Stacie please update to version 1.0.5 the conflict with Sharebar should be fixed now.

  19. Hal says: September 2, 20112:10 am

    Patrick, replacing the invalid quote character did the trick. Love the control your plugin provides! Thanks.

    Look for a donation!

  20. Jordan says: September 2, 20113:41 am

    Hey Patrick. Love this plugin and it's doing exactly what I need! On my homepage I have a widget that only displays one post at a time - my most recent. However I would also like to make past posts sticky so they go to the top and are a featured post from the past. However when I make an old post sticky the widget populates with two posts (even though I'm only telling it one), the sticky post on top and the most recent on the bottom.

    Is there any way I can have only one displayed at all times, even when using sticky posts? Any help would be much appreciated.

    • Patrick says: September 3, 201112:13 pm

      Hi Jordan,
      If I understand correctly you want to feature just one post from the past. I will have to test if there is an issue with the way WordPress handles sticky posts.
      But you could achieve what you want by adding this to the WP_Query setting where 7 is the post id that you want to feature.
      "ignore_sticky_posts": "1",
      "posts_per_page": "1",
      "p": "7"

  21. Barbara says: September 2, 20114:12 am

    I love the control your plugin offers! It's excellent! Do you have any plans to include options for displaying custom fields? Our site does reviews and we keep the score (ie: 8/10) in a custom field called "rating". It would be great to be able to show that next to the title.

    • Patrick says: September 2, 201112:21 pm

      Thanks for the donations everyone.
      Great idea Barbara. I will have a look at doing that for the next update.
      I will also look at documenting the WP_query options that relate to custom fields.
      You can do stuff like showing just posts that have a rating greater than 5 or display a list of posts ordered by rating.

  22. CJ says: September 3, 20116:29 am


    I am trying to find why there is an extra < at the beginning of the read more elipse on http://www.insideperformance.ca/clinicscamps/ sidebar only on the first post excerpt. Any ideas?


    • Patrick says: September 3, 201112:04 pm

      Hi CJ,

      Can you post the code you are using for the "Widget output template" and if possible the source of the "General Skills Clinic" post.

  23. PokerGob says: September 4, 20115:43 am

    Is it possible to align the text around the thumbnail image?

  24. Patrick says: September 6, 201112:35 pm

    Hey updated to 1.0.5.

    • Added ability to display custom fields. Add to the output template in this format {META[name]} where name is the custom field name (thanks Barbara for this suggestion)
    • Added option to truncate title and excerpt by number of words instead of just chars. This should be useful for displaying the excerpt without words getting trimmed off.
    • Rewrote the WordPress excerpt trimming function to strip code within style and script tags correctly. This should fix conflicts with plugins such as Sharebar.
  25. Jordan says: September 7, 20113:10 am

    Hi Patrick,
    I noticed the excerpts now strip the paragraph tags. My excerpts looked alot better before with the line breaks. Any way this is controllable? Also does it strip hyperlinks? Let me know Thanks!

    • Patrick says: September 7, 20113:23 pm

      Hi Jordan,
      Yeah that was a bug introduced in 1.0.5 I just fixed it then and updated the plugin. The output should now be the same as 1.0.4. Also FYI all tags are stripped except for A, P and BR.

  26. judd says: September 16, 20116:20 am

    Looks just what i am looking for....is it compatible with 3.2.1

    • Patrick says: September 16, 20119:48 am

      Hi Judd,
      Yes it is compatible with 3.2.1. That is what I am running it on myself.

  27. Pokergob says: September 17, 20117:24 am

    Can you include a default thumbnail if no thumbnail is available?

    • Patrick says: September 18, 20111:39 pm

      Unfortunately no that would be outside of the scope of this plugin. But I am writing a plugin which will improve post_thumbnail functionality and let you chose default thumbnails based on category, tags etc.. And also help migrate over by using the first attachment as a thumbnail or load thumbnail based on meta key value.

  28. David says: September 17, 20119:02 pm

    Hi. A newbie question. I would like to put "posted by" before the author's name, after the ellipse, but have now idea how to do even such a simple thing. I can insert {AUTHOR} after {EXCERPT} and it works fine, but would like to add that bit of text in.

    Your widget works brilliantly. Thank you.

  29. David (as above) says: September 17, 201110:12 pm

    Hey, I did it, and even added a bit of color, and put the excerpt on a new line. I love this stuff, it's better than doing puzzles in the newspaper. know it's elementary for you guys, but here is what I ended up with

    {THUMBNAIL} {AUTHOR} on <a title="{TITLE_RAW}" href="{PERMALINK}" rel="nofollow">{TITLE}</a>. {EXCERPT}

  30. David says: September 17, 201110:14 pm

    I'm afraid that didn't post correctly: maybe it interpreted the code. Perhaps you could sort that out for your other readers.

    • Patrick says: September 18, 20111:30 pm

      Glad you worked out the problem. Fixed your comment as well.

  31. Jack Godot says: September 29, 20119:54 pm

    How do I query for a taxonomy? The WP_Query codex explains that it now must be done with an array. I understand the codex but I am unsure how to adopt the syntax according to your example above.

    Cheers Jack

    PS I tried the following but it didn't work.

        "tax_query": [
               "subject": "iran"
    • Patrick says: September 29, 201111:22 pm

      Hi Jack,
      I assume you are running WordPress 3.1+. The syntax of your query is correct and it is in valid JSON format. The issue seems to be that the tax_query setting is supposed to be in a slightly different format to what you provided.
      Try something like this:

          "tax_query": [
                  "taxonomy": "subject",
                  "field": "slug",
                  "terms": "iran"

      For future clarification to handle multiple taxonomies you would do something like this (based on example from the WP_query docs)

          "tax_query": {
              "relation": "AND",
              "0": {
                  "taxonomy": "movie_genre", 
                  "field": "slug", 
                  "terms": ["action", "comedy"]
              "1": {
                  "taxonomy": "actor", 
                  "field": "id", 
                  "terms": [103, 115, 206],
                  "operator": "NOT IN"
  32. Ginny says: September 30, 20111:01 am

    I need to insert a break after the title - right now there is no space between the title and the post. This may be because the columns for the posts are 180px. Can you point me to the correct area of the code to insert the break? I'm familiar with PHP.

  33. Ginny says: September 30, 20111:59 am

    I need to insert a break after the title, just before the post. Where in the code should I look? I'm pretty familiar with PHP.

    • Patrick says: September 30, 201110:12 am

      Hi Ginny,
      Just change your "Widget output template" option to something like this.
      <li>{THUMBNAIL}<a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a><br/>{EXCERPT}</li>

  34. Jacek says: September 30, 20112:34 am


    I trying to use yout plugin on my test site:
    But i want to use it three times on homepage.
    I'm trying to show each choosen category - it works, but when i'm using code for showing category, a post count won't work.

    So for example i put in each widget this code:

        "cat": "6"


        "cat": "7"


        "cat": "8"

    When i do something like this:

        "cat": "6",

    post count work, but it show only newest posts.

    • Patrick says: September 30, 201110:10 am

      Hi Jacek,
      The following example is invalid JSON you need to remove the comma (,).

          "cat": "6",

      Otherwise you could try overriding all the default settings like this:

          "post_type": "post",
          "posts_per_page": 2,
          "orderby": "date",
          "order": "DESC",
          "cat": "6"
  35. Jacek says: September 30, 20115:57 pm

    Yes, I know it is invalid, but i just describe a situation when post count work.
    I tried your code to override default settings, but it isn't working.

  36. Jacek says: September 30, 201110:17 pm

    Ok, so problem is:
    When I put "cat" or "category_name" in wp_query options box then post count don't work.

    • Patrick says: October 1, 201112:29 pm

      That is strange it works fine on my test server. You could try using category__in instead.

          "category__in": [6]

      If that doesn't work either can you let me know your WordPress version and if possible the theme you are using so I can do some further testing.

  37. Ginny says: October 1, 20115:41 am

    Thanks! Got it. Now I need to show a thumbnail. In my version of the widget, there is no option for the photo or the thumbnail size, although it does show up in the advanced settings. It's in there; however no thumbnail shows up. Can you help?

  38. Ginny says: October 1, 20115:47 am

    Do I have to upgrade to version 1.0.6? If so, do I have to delete the old version and start over?

    • Patrick says: October 1, 201112:21 pm

      The reason the thumbnail options wouldn't be appearing is because your theme doesn't support the new post_thumbnail setting. You can add support for this feature by adding this code to the themes functions.php file:

      if ( function_exists( 'add_theme_support' ) ) {
        add_theme_support( 'post-thumbnails' );

      If you are using version 1.0.4 of the plugin then there is no reason to update other than some new options. However if you are using 1.0.5 I would recommend updating since 1.0.6 has a couple of bug fixes. You can see the change log here http://wordpress.org/extend/plugins/recent-posts-plus/changelog/. BTW you don't have to delete the old version just overwrite the files from the old version and your current settings will remain.

  39. Ginny says: October 1, 20112:36 pm

    Thank you for your response. I am working with the Prestige theme and It is not very cooperative. I did ad the functionality to the functions.php file, but it is still not working. I may be at the end of the road, but appreciate any ideas you have.

    • Patrick says: October 1, 20119:37 pm

      Sorry to hear it still isn't working are the thumbnails options still not showing? As long as you have WordPress 2.9+ and the theme supports post_thumbnails then it should work. I can't test it with your theme since there isn't a free version available but occasionally some complex themes can cause issues (although they shouldn't since the plugin only uses basic core functions).

  40. Ginny says: October 2, 20114:02 am

    I will stay at it. This theme does not play well with others, IMO.

  41. David says: October 4, 20114:36 am

    any chance I could use the posters (Gr)avatar?

    • Patrick says: October 4, 201110:42 pm

      Hi David good suggestion I have updated the plugin with this option. Update to 1.0.7

      1.0.7 changelog:

      • Added option to display post author's avatar. Using `{AUTHOR_AVATAR}` tag.
      • Added ability to add raw PHP code to the widget output template.
  42. Ginny says: October 5, 20114:10 am

    Permalink issue: I'm using widget in 3 separate columns in a sidebar. Each column has a different post in it. When I mouse over the links, they show the correct post link; however when I click on the link, it takes me to the most recent post every time. Any ideas?

    • Patrick says: October 5, 201110:13 am

      Sounds like a strange issue you are having is there any possibility you could send me a link to the page?
      What are you using for the widget output template?

  43. David says: October 5, 20115:59 am

    Wow, thanks for that. I found that '{author-avatar}' was a bit big, so used the php styling you have suggested, reduced the avatar size to 20 (to match "decent comments" plugin) and added '{author]'. Then a couple of line breaks at the end, and it looks great.

    <?php echo get_avatar(get_the_author_meta('user_email'), 25); ?> Â{AUTHOR} Â on 
    <a title="{TITLE_RAW}" href="{PERMALINK}" > {TITLE} < /a>
    {EXCERPT} <br><br>

    I hope that code comes out legibly!

  44. Ginny says: October 6, 20112:10 am

    I have not posted the site yet - posted locally. I'm using A F PW to display the most recent post on the top content area. Below it is another content area with 3 columns, each showing the next most recent post. All that works well on the home page and when mousing over the link, the correct URL shows.Here are my settings:
    "offset": "1"

    <a title="{TITLE_RAW}" href="{PERMALINK}" rel="nofollow">{TITLE} {AUTHOR} {DATE}</a>{EXCERPT}<a href="{PERMALINK}" rel="nofollow">Read more</a>
    I'm using a custom single.php page; here's the code that receives it:

    <strong>Widget Ready</strong>
    This single is widget ready! Add one in the admin panel.

    <!--END content DIV-->
    So the problem is that I need to use this page for all posts and without additional code, it refers back to the main post. It looks like I need to add some conditional statements that call the next most recent post from column 1, and so forth. Would that code go in the advanced-fpw.php? and if so, where?

  45. Ginny says: October 6, 20112:12 am

    So that single.php code did not come out. here it is:

  46. Ginny says: October 6, 20116:07 am

    <?php if (function_exists('dynamic_sidebar') dynamic_sidebar('Single')) :

    • Patrick says: October 6, 20118:51 am

      I think I know what your problem is actually. Are you using 1.0.7? There was a problem when I sent the updated plugin through which I rectified immediately, you would have had to check for updates almost at the same time I sent the update, which is really unlucky . Anyway just update manually with this zip http://downloads.wordpress.org/plugin/recent-posts-plus.zip and the issue should go away.
      Otherwise if you are still having issues I am not sure I recreated your set up as best I could and didn't have any problems.

  47. Misty Weaver says: October 9, 20118:27 am

    Firstly, this is the best custom widget ever! I concur with Barbara, I would love to display custom fields in the widget. We often have multiple authors and I haven't been able to figure out the WP_Query or display to make it recognize co-authors plug-in or even better just list what I put in a custom field called "recent_posts" instead of authors. Right now, I'm adding the authors names to the excerpt and it looks silly. But lo, I cannot publish without all of the authors names :)

    • Patrick says: October 9, 201110:55 am

      Hi Misty,
      Custom Field support was added in version 1.0.5 just add the following tag to your Widget output template: {META[recent_posts]}
      {META[name]} Displays the value of the specified custom field. E.g. {META[Currently Reading]} or {META[Rating]}. Note: Only returns the first result.
      You should be able to use the raw PHP support that was added in 1.0.7 to utilize the co-authors plugins template functions.
      For example (note I based this on the co-author plugin documentation it should work for this http://wordpress.org/extend/plugins/co-authors/ or this http://wordpress.org/extend/plugins/co-authors-plus/ plugin):

          <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a> by <?php coauthors(); ?>
  48. Dave White says: October 13, 20118:44 am

    Excellent plugin, thank you.

    • Patrick says: October 13, 201110:13 pm

      Thanks Dave

  49. Jonas Grumby says: October 14, 20117:58 am

    Hi Patrick, This plugin exhibits one bit of weird behavior which is that if you exclude a category from displaying in the widget, then when you visit that category page the widget does not show any links at all. Any thoughts? Thanks.

    • Patrick says: October 14, 20111:36 pm

      Hi Jonas,
      I am trying to recreate your problem on my testing server but so far I haven't been able to. So you have something like this in the WP_Query option to show all categories except one (in this example category 3):


      But when you visit the category page for category 3 the links don't show at all. Is that correct?
      Can you send me a link to the page that isn't working, and let me know what version of WordPress you are running?

  50. Wayne says: October 21, 20112:09 pm

    On a regular post page, I want to be able to show a list of custom posts that relate to regular posts based on commonly named tags (and only where the tag names are equal)? Is there a way to extract the tags from the current regular post (e.g. using get_the_tags() or similar) and use the result in the "tag:" field of this plug-in?

    • Patrick says: October 21, 20112:32 pm

      Hi Wayne,
      I am not completely clear on what you are trying to do.
      If you are trying to dynamically modify the WP_Query param to insert a tag setting based on the displayed regular post then it can't be done with this widget. Have a look at the section in the documentation above under "Utilizing the meta_query option". If it can't be done with the meta_query option then it can't be done. The reason for this is that the WP_Query options are used before the "Widget output template" is parsed so changing it in that way is outside the scope of this widget.
      If you are trying to display a list of regular posts, then under them display related posts you could insert PHP code into the "Widget output template" to do this.
      However as much as I would like to say this widget can do all the things you want I think it would be a lot easier to just write a bit of custom code and stick it into; your theme, a custom widget, or into a PHP widget (however this last option would be slower since the code would have to be evaled).

  51. Thomas Dale says: October 22, 20117:49 am

    Is it possible to get the posts to display randomly from a given category so every time someone visits the homepage, a different set of posts are displayed? Thanks!

    • Patrick says: October 22, 201110:05 am

      Hi Thomas,
      Yes you can do that by adding the following code into "WP_Query" setting and changing the "cat" setting to be the category you want to display them from.

          "orderby": "rand",
          "cat": "1"
  52. rob says: November 15, 20113:46 pm

    Great plugin, only thing is, Its all capital letters for the title ?? I'd like it to be normal.

    • Patrick says: November 18, 201110:36 am

      Hi Rob,
      The plugin outputs the title the same way that you enter it. It sounds like your WordPress theme is changing the styling for the title text most likely with the text-transform css attribute.
      See http://developer.mozilla.org/en/CSS/text-transform

  53. Luke says: November 17, 201112:46 am

    Hi, can I insert in a page directly using php code eg. instead using widget area?

    • Patrick says: November 18, 201110:41 am

      Hi Luke,
      I am not sure exactly what you are trying to do but you can insert php code into the widget output template.
      If you only want to display a certain list of pages then you can use a WP_Query setting like this:

          "post__in": [2, 3, 4]
  54. Kelie says: November 17, 201111:52 am

    This is exactly what I need, but instead of having it output vertically, I am wanting it done horizontally. How would I go about doing this?

    • Patrick says: November 18, 201110:28 am

      Hi Kelly,
      That is fairly easy to do but it has more to do with your theme css styles than the widget settings see http://css.maxdesign.com.au/listamatic/horizontal01.htm
      Adding the CSS styles below to your theme should work:

      .widget_recent_entries li {
          display: inline;
  55. Darin says: November 20, 20114:24 pm


    Thanks for the plug-in. It is very close to what I need. One question:

    1) I can't get thumbnails to display. Is this because the plug-in does not auto-generate them from images in posts or perhaps my theme (Journalist 1.9) is not compatible?



  56. Darin says: November 21, 20113:36 pm

    O.K., thanks. Auto-thumbnails would be so cool :(

    Meanwhile, I've turned thumbnails off and I'm getting some weird formatting. If you go to my web page you can see the post "The New Top 10" shows the first "<" of the img html code but nothing else. "How to teach kids photography" is jammed into the post before it, "Gotcha" is empty, and "Real, after all" just has the first letter of the post. Something with the plug-in or the theme or...?

    Thanks again...

    • Patrick says: November 24, 20111:27 pm

      Hi Darin,
      I have just updated the plugin to v1.0.8 this should fix the issues you are seeing with the excerpt.

  57. tom says: November 22, 20113:33 pm

    how can i increase the size of the font and change the style of the font? also, there are no paragraphs in my excerpt. any suggestions? thank you for a great plugin!

    • Patrick says: November 24, 20111:32 pm

      Hi Tom,
      The font size can be increased by modifying your themes style sheet (http://codex.wordpress.org/Appearance_Editor_Screen)
      For example to change size of the individual elements:

      .widget_recent_entries li a, .widget_recent_entries li {
          font-size: 15px;

      For example to change size of the title:

      .widget_recent_entries h3 {
          font-size: 30px;

      You can wrap the excerpt tag in a paragraph like this (Widget output template option):

      <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>
  58. Sergio says: November 23, 201110:23 pm

    Hey Patrick - First and foremost, excellent plugin. I was on the verge of writing my own when I found this. I like the ability to write your own template using code.

    I found something that is causing issues. I read that you strip out all tags except a, p, and br. What I've found is that if you set an excerpt truncation and, for any post, if it falls in the middle of an anchor tag, the output is not correct.

    It might be a good feature to add an allowed tags field to be edited by the user. Just an idea. If there is a way to fix this, let me know.

    Thanks again, and great work.

    • Patrick says: November 24, 20111:53 pm

      Hi Sergio,
      Yeah I noticed that issue just a few days ago as well. The problem is that if you want to truncate text that contains html you run into the problem that the html tags themselves will be counted as well (either in the word count or char count). I can only see two ways to solve the issue:
      1. Strip out all html tags in the excerpt (this is what WordPress often does) that way you are only trimming plain text so the truncation algorithm is simple.
      2. Parse the html using DomDocument (http://php.net/manual/en/class.domdocument.php) that way you can accurately traverse the dom and count the number of characters in any of text nodes. Then you can remove proceeding nodes safely. The issue with this is that processing html text with DomDocument is relatively slow especially if you need to do it 15+ times in one page load.
      I have updated the plugin to 1.0.8 and decided to go with option 1 for now. While this will strip the links from the text I have found a way to preserve formatting by calling wpautop on the truncated text.
      I might add the second method as an option at a later stage since it should be ok if the output is cached and would allow html in excerpts.

  59. Sergio says: November 25, 20111:23 am

    I think that's a good option to have at a minimum so that the output is more assuredly not going to look odd. I agree that since WordPress does it, it should be a good approach. One result of this, as you mention with the use of wpautop, is that you may get extra paragraph tags thrown in. Not an issue, but I needed to update the custom code a styling a bit.

    I've seen customizable allowed tags lists in other plugins and thought it was a nice approach to the issue.

    I'll keep an eye out for updates. Thanks again for the quick response and action.

    • Patrick says: November 25, 20119:06 am

      Glad to hear it is working for you. Yeah wpautop can sometimes add extra paragraphs but I think that is the best option ultimately. Adding a list of allowed tags won't fix the issue since those allowed tags will still be treated like text and potentially chopped up leading to weird markup.
      I wrote a blog post last night about the differences with trimming html and text and wrote a class that can handle html trimming similar to what I outlined in the comment above http://www.pjgalbraith.com/2011/11/truncating-text-html-with-php/. Of course the html method is a lot more heavyweight than the text trimming functions but I might add it to Recent Posts Plus as an option in the future for people who need it.

  60. Darin says: November 26, 20116:04 am

    Hey Patrick,

    Excellent update. Loos great--but one "bug" has crept in. If you look at my page you'll see two posts ("The New Top 10" and "Gotcha!") that have unexpected space after them. What they have in common is that there is a picture posted first, before any text. In the case of the "Top Ten" it is all pictures. The plug-oin seems to be leaving space for every picture--thus "top 10" has lots of space since it has ten pictures.

    But looks great otherwise (though I'm still dreaming of auto-thumbnails... :)


    • Patrick says: November 26, 201112:02 pm

      Yeah it's definitely looking better now. I see what you mean about the empty paragraph tags though, I'll see what I can do about it later.
      I do have a Default Post Thumbnail plugin in development if you want to try it out let me know and I can send you a copy.

  61. Darin says: November 26, 201112:20 pm

    Hey Patrick,

    I'd be happy to test out your thumbnail plugin and/or any updates to this one.


  62. Jonny007-MKD says: December 3, 201112:22 pm

    I really love your plugin! It is very customizable and exactly what I need.
    What I don't like are the -tags around the ellipsis and that if I set it to empty it still appears. I want to have the (more) link right behind the text not beneath it.
    Can you help me?


    • Patrick says: December 7, 20115:09 pm

      Hi Jonny,
      The plugin doesn't add any tags around the ellipsis. Can you please explain the issue in a bit more detail I am sure it won't be too hard to fix.

  63. Jeff says: December 4, 20118:50 am

    Dear Patrick,

    We are using qtranslate and the stripping of the title tags means we lose the language tags and end up with a concatenation of both languages (Chinese and English in this case)

    I just dropped the strip_tags to make it work:
    // $instance['title'] = strip_tags($new_instance['title']);
    $instance['title'] = $new_instance['title'];

    Maybe there's a nicer way to do it? It looks a lot like dealing with the more tag, but not tossing everything away. These are the qtranslate tags with some sample text:



    • Patrick says: December 7, 20115:04 pm

      Hi Jeff,
      Yeah that isn't something that I considered. You can fix it by just adding the title with PHP in the Widget Output Template.

      <a title="{TITLE_RAW}" href="{PERMALINK}"><?php the_title(); ?></a>
  64. Horia says: December 6, 20112:30 am

    Hey, nice plugin. Is there a way I can download version 1.0.6 of the plugin?

  65. Cor van Noorloos says: December 8, 20115:21 am

    Hi Patrick, I'm not entirely sure if this would be possible. But would it be possible to also limit the post excerpt to the first paragraph? (or the first X amount of paragraphs)

    Best regards,


    • Patrick says: December 8, 201112:10 pm

      Adding something like the below to your Widget Output Template should work:

      <a title="{TITLE_RAW}" href="{PERMALINK}"><?php echo substr(get_the_excerpt(), 0, strpos(get_the_excerpt()."\n", "\n")); ?></a>

      Select first block of text before the first line break.

      <a title="{TITLE_RAW}" href="{PERMALINK}"><?php echo preg_match('~(<p>.+?</p>){1}~i', get_the_excerpt()); ?></a>

      Selects the contents of the first paragraph tag.
      See this thread for more info on using php to extract the first paragraph from text http://www.sitepoint.com/forums/showthread.php?624319-Extracting-the-first-paragraph-of-a-content

  66. Jonny007-MKD says: December 8, 20116:58 pm

    Hi Patrick,

    At my site there are [p]-Tags around the ellipsis. So if they're not from the plugin, do they come from WordPress? Thanks for your help!

    • Patrick says: December 8, 20119:37 pm

      I assume you mean <p></p> tags around the ellipsis? If that is the case then it shouldn't be happening and I haven't seen that behavior before.
      Can you send me a link to the website so I can have a look at the page source? Also can you post a screenshot of the widget settings?

  67. Jonny007-MKD says: December 9, 20112:52 am

    Now that i looked into the source I noticed that there are no real <p></p> tags around the ellipsis. All that happens is that the excerpt is wrapped into it and the ellipsis is afterwards.
    <p>Excerpt Body Text&#8230;</p>
    <a title="Title" href="URL">(more)</a>

    This generates the same behaviour as when the <a> tags are in <p> tags.
    Is there some way to change this so there is no newline for the (more)? Setting display:inline for p doesn't work since then the newline after the date is also erased.
    <li>{THUMBNAIL}<a class="title clearfix" title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a><p class="post-date">{DATE}</p>{EXCERPT}<a title="{TITLE_RAW}" href="{PERMALINK}">(more)</a></li>

    thanks and greetz

    • Patrick says: December 9, 20112:09 pm

      Yeah no wonder you are having issues since this isn't a use case I accounted for. I have updated the widget with a new Widget Output Template tag {ELLIPSIS}...{/ELLIPSIS}.
      You can now do something like this:

      <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>
      {EXCERPT}{ELLIPSIS}... <a title="{TITLE_RAW}" href="{PERMALINK}">(more)</a>{/ELLIPSIS}

      Also I removed the site info from your previous comment.

  68. Nicole says: December 9, 201110:06 am

    Hi Patrick,

    Thanks for this plugin. One question...I'm trying to offset my posts by the first three (I.e. I want to prevent the first three posts from showing...). I put:

    "offset": "3", //number of posts to skip over

    In the WP_Query Options field but the first three posts are still showing up...am I missing a step? Thanks for your help!

  69. Nicole says: December 9, 201110:14 am

    Oh! Never mind...I just removed the , and it worked! I could hug you for making this plugin. Thank you!

    • Patrick says: December 9, 20112:12 pm

      Glad to hear you worked out the issue :D

  70. Jonny007-MKD says: December 13, 201110:24 am

    Hi Patrick,
    thanks a lot, this is great! This whole plugin is great :) Thanks again


  71. Sam says: December 21, 20113:12 am

    I hate to request features on free software, but maybe somebody can help me think of a way through this. I am using a couple of Recent Posts Plus widgets on my static home page. I would love it if there was a way at the bottom of the widget, after the list of posts, to see more from the category. For example, one widget is for News about the school. Would be great if I could either (1) click the News title or (2) click a link at the end of the list for more news articles. Another widget is for the Quote of the Week, but it'd be great if a user could click the title or a More link to get previous quotes of the week. Etc.

    • Patrick says: December 22, 20113:42 pm

      Hi Sam,
      If I understand what you are trying to do correctly that would be very difficult (probably impossible) to do using this widget. You have to remember that while it is very flexible it was intended as a replacement for the default recent posts widget. In your situation it would be best to get a developer to create a custom widget that can perfectly fit your requirements.

  72. Alan says: January 22, 20126:25 pm

    Hi Patrick,

    Really would like to use your excellent widget on a redesign I am working on, but I am wondering if it's possible to only display the thumbnail for the first post retrieved? I know I could do this easily with CSS, but that would require the user to download thumbnails they aren't even seeing, which is less than optimal. Thanks in advance!

  73. Alan says: January 22, 20126:55 pm

    Nevermind, Patrick. I think I managed to hack it together with my meager PHP skills. I just edited recent-posts-plus.php starting at 241, changing it to this:

    $count = 1;

    while ( $the_query->have_posts() ) { $the_query->the_post();

    $ID = get_the_ID();

    if ($count == 1) {

    if($include_post_thumbnail == "false") {


    } else {

    $POST_THUMBNAIL = get_the_post_thumbnail($ID, array($post_thumbnail_width, $post_thumbnail_height));


    } else {




    It appears to be working, but if you think this was the wrong method, I am all ears. Thanks again, this plugin was a big help.

    • Patrick says: January 31, 201212:42 am

      Hi Alan,

      Yeah your solution should be fine as long as you don't need to create a second instance of the plugin that shows more than one thumbnail. If that is the case you may be better doing it with CSS.


      Edit: Sorry for the late reply your message got stuck in the spam queue.

  74. Thomas says: February 1, 20129:01 pm

    I would need to have a line break within the title of the widget. But if I use "first linesecond line" the "" will be erased after saving the widget.

    Is there any chance to include some HTML in the title of the widget

    • Patrick says: February 3, 201210:51 am

      The plugin applies the default in-built WordPress widget title filters which escape any html. Unfortunately that is how WordPress works by default.
      You could modify the plugin code change this:
      $title = apply_filters( 'widget_title', empty($instance['title']) ? 'Recent Posts' : $instance['title'], $instance, $this->id_base);
      To this on line 70:
      $title = empty($instance['title']) ? 'Recent Posts' : $instance['title'];

  75. Freddy says: February 4, 20124:30 am

    Great Stuff!
    Any chance of adding more Template Tags to the Widget Output Template? Perhaps {CATEGORY} to display the category that the post falls under. . . . etc?
    Thanks for your work! I am using it as an administrative tool to display my posts in alphabetical order with clickable titles etc.

    • Patrick says: February 7, 201211:07 am

      Sure let me know what tags you would like to see and I will try to add them in the next update.

  76. Freddy says: February 9, 20127:33 am

    MMmmmm, I can only think of CATEGORY and TAGS right now. Perhaps other folks would like others?

    Secondly, is the only way to format the output to edit the CSS sheet? Can we edit the CSS to have them display tightly, so that the DATE, and CATEGORY are on the same line, for example, and there is no blank space before the next line, the EXCERPT, starts?

    Thanks again!

    • Patrick says: February 13, 201210:19 am

      Hi Freddy,
      The plugin doesn't provide any CSS styles. You will need to modify your themes stylesheet to get the result you are looking for.
      Have a look at the section above titled "Examples of Styling the Output".

  77. Phyllis says: February 13, 20123:31 am

    Hi! I was so relieved to finally find a plugin that works - well...mostly. So, three things I'm trying to accomplish but can't:

    1 - I want only one category of posts to show, but when I enter the code in the WP Query Options box, nothing happens (in other words, it's being ignored):
    { cat: "8, -10", }

    2- I want to add a "read more" link and when I enter the code into the Widget Output Template box, my posts excerpts & thumbnail disappear and all I'm left with is the "read more" links. In fact, if I put anything in the Widget Output Template box, my posts disappear.

    3- Finally, I'd like to get rid of the bullet points before the post titles.

    Thanks so much!

    • Patrick says: February 13, 201210:32 am

      Hi Phyllis,
      For number one it is because you have provided the setting in invalid json format. It should be like this:
      { cat: "8, -10" }
      If you have any more trouble try pasting the code you are using into this site to validate it http://jsonlint.com/.
      For number two can you post the code you are using I have never seen that issue before and it sounds like something is going wrong somewhere. This is what you should use for a read more link:
      <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>
      {EXCERPT}{ELLIPSIS}... <a href="{PERMALINK}">Read More</a>{/ELLIPSIS}

      For number three it depends entirely on your theme so you will have to do that with CSS add the following to your themes stylesheet.
      .widget_recent_entries ul {
      list-style-type: none

  78. John says: March 23, 20124:19 am

    So I put the widget in my sidebar. Looks just like the recent posts that comes with word press. I have most updated version of WP. Options Framework is only other plugin I have running.


    • Patrick says: March 30, 20129:08 pm

      Hi John,
      I am not sure what the problems is?
      This widget has the same output format as the default recent posts widget it just has more customization options.

  79. Krzysztof says: March 26, 20121:52 am

    Hi, I've wanted to replace widget title with prepared image, so I've added a few lines to the plugin code:
    --- recent-posts-plus.orig.php 2011-12-12 05:22:26.000000000 +0100
    +++ recent-posts-plus.php 2012-03-25 17:10:50.401000000 +0200
    @@ -70,6 +70,12 @@
    $title = apply_filters( 'widget_title', empty($instance['title']) ? 'Recent Posts' : $instance['title'], $instance, $this->id_base);
    $widget_output_template = (empty($instance['widget_output_template'])) ? $this->default_config['widget_output_template'] : $instance['widget_output_template'];

    + $uploads = wp_upload_dir();
    + if (file_exists($uploads['basedir'].$title)) {
    + $imgdata=getimagesize($uploads['basedir'].$title);
    + preg_match('|.*/([^/]+)\.[^.]+|',$title,$alt);
    + $title = '<img src="'.$uploads['baseurl'].$title.'" width="'.$imgdata[0].'" height="'.$imgdata[1].'" alt="'.$alt[1].'">';
    + }
    echo $before_title . $title . $after_title;

    $output = $this->parse_output($instance);
    I find this patch very useful, but I am not sure if this patch is safe (does not pose a security threat) and if it fits the wordpress plugin coding guidelines (if there are any).

  80. Mark says: April 6, 20123:25 pm

    Hi Patrick,

    I'm having a few issue.
    1.) aligning the text with the top of the image.
    2.) Unable to eliminate "by Jerome Corsi" underneath the title and
    3.) Reduce the space between the title and the description.
    I'm using WP ver. 3.3.1

    Can you help me....Thanks, Mark

  81. Elena says: May 15, 201212:56 am

    Hello, great plug in.
    How can i replace

    [wpdiv id="text" ] and [/wpdiv]
    in function preg_replace()

    My content is follow:
    [wpdiv id="text" ]

  82. testtoabc says: May 28, 20122:20 pm

    I use raw php code with sql on http://www.webinbangla.com/2012/05/recent-comments-on-wordpress/ for showing recent posts in WordPress without using plugins.

  83. Elissa says: June 18, 20128:28 pm

    Patrick, Hi, and thank you for your work. I am not able to get the menu of options for controlling the length of post excerpts and other features of your plug in on my Akiraka template. In other words, I don't get those 12 different options in my widget. Also, I did install the Default Thumbnail Plus and am having some success with getting thumbnails, but have not yet succeeded in getting your code to finetune that formatting into style.css. I tried putting it at the bottom, but nothing changed. Any thoughts? This would really add great visuality to our blog! Thank you!

  84. CJ says: July 14, 20122:27 am

    Hi, I was wondering if there is a way to display just the thumbnail from the post but have it listed in 2 columns?

    I currently have it as:


    Any ideas?

    Thanks for your help!

  85. Jordan says: July 25, 20128:05 am

    Hey Patrick! Great plugin! Use it all the time.
    Quick question, the plugin seems to be stripping tags from the excerpts. It worked fine before but now it is not. Not sure if this was due to an update or what. The posts are formatted fine on the post page, but the plugin now ignores the space between paragraphs.
    Any ideas? I'd appreciate!

  86. Jessica says: July 29, 20121:14 pm

    Hi, loving your widget! Thanks for putting this together and sharing.

    I'm having difficulty setting up the Recent posts to show only recent posts in particular category

    Tried this:
    "post_type": "post",
    "posts_per_page": ,
    "orderby": "date",
    "order": "DESC",
    "category_name": "build,entrepreneur,in-her-words,dream",
    "cat": "3",
    "post__in": [3]

    and just this:

    "post_type": "post",
    "posts_per_page": ,
    "orderby": "date",
    "order": "DESC",
    "category_name": "join",
    "cat": "7"

    But still pulling in the 3 three posts no matter what blog category page you're on. Can you check out the site and advise where I might be going wrong?

    Thanks in advance!

  87. Renu says: August 22, 20122:37 am

    Hello Patrick Galbraith

    I am using this Recent Post widget and want to show the tags too for all the posts. Can you pl help as i tried to look for the options and short codes given above to show the tag names but could not find to show the tags names given for the respective post.

    Waiting for the reply.


  88. Phillip Wilhelm says: August 25, 20128:49 am

    Love this plugin. After much trouble shooting and checking to make sure everything was properly typed into the WP_Query I can't get the results to be limited by a category.

    I've tried all the suggestions listed above, and I'm using WP 3.4.1 and can't seem to get the widget to limit the results to a category. I am using the plugin in different instance such as: Athletic Scores, School News, & Updates. How can I make this work without hard coding it in?

    Really perplexed by this issue, you would think that it would just query results but thats the only issue I am having....not sure if the whole WP_Query is working properly for the widget might be the issue...

    Interested in your thoughts Patrick. Really flexible plugin from what I have see!

  89. Phillip Wilhelm says: August 25, 201211:38 pm

    "post_type": "post",
    "posts_per_page": 3,
    "orderby": "date",
    "order": "DESC"
    "cat": "63",

  90. House says: August 30, 20127:32 am

    I am trying to float the img to the left of the title and excerpt - i tried adding the styles to the custom css - and the style.css and it did not work?

    Is there away to do it in the - widget out put.

    great plugin - thx!

  91. Glark says: August 30, 20128:38 pm

    Ooooo nice work! Did you ever add a Category Template Tag per Freddy's comment?

  92. Sam says: August 31, 20121:05 am

    Hi, I wanted to ask.. Do you have any tags like {CATEGORIES} or {CATEGORY} to display all the categories the post is filed under?

    I would really want that, since PHP doesn't work in the widget.

    • Patrick says: August 31, 201211:40 am

      Hi Sam,
      Have you tried using

      <?php echo get_the_category_list(', '); ?>

      in the Widget output template?
      Make sure you are running version 1.0.7 or later.

  93. Cavow says: August 31, 20122:16 am

    I can't get this to work on my website i use heatmap pro v5 wordpress theme.
    when i drag the widget i can't see the extra options like the thumb options and in the home page nothing is shown. any idea?

  94. Sam says: September 1, 20125:01 am

    Hi Patrick,

    Thanks a ton. It worked.

    And, the plugin's excellent. Thanks! :)

  95. Tom says: September 1, 20129:28 pm

    Hi, thanks for a great plugin.

    I try to read through posts/comments for my solution but don't find it.

    What I like to achieve is to have control of the widget box height, so if set to 500px high and showing 10 posts with images, I want only 4 posts to be visible. A box slider allows me to scroll down to see the rest of the posts in the widget.

    Is it a CSS coding to controll or limit the box size? Or a feature you could at in your widget?
    Any tips other plugins available to control widget height as I like to control other widgets as well would be appreciated.

    Best regards,


  96. Tom says: September 2, 201210:09 pm

    Added the following in the CSS

    .widget_recent_entries {

    Partially solved my need, but top part of widget disappears and leaves a ugly bottom, when scrolled down to last post.

    It works for now, but if anyone has suggestions, I gladly take it.

    // Tom

    • Patrick says: September 2, 201210:33 pm

      Hi Tom,
      Can't help that much without seeing the site.
      But you probably need to use something like this:

      .widget_recent_entries {
          margin: 15px 0;
      .widget_recent_entries .widget_body {
          height: 100px; 
          overflow-y: auto;

      You will need to adjust the padding and margin to fit your needs.

  97. wall art sticker says: September 3, 20129:53 pm

    Just what a excellent web site! Amazing. Thanks! Kim

  98. Cole says: September 25, 20121:43 am

    If I were wanting to turn off the widget title completely, what would be the best way to do it?

    Could I delete this from the recent-posts-plus.php?

    $title = apply_filters( 'widget_title', empty($instance['title']) ? 'Recent Posts' : $instance['title'], $instance, $this->id_base)

  99. Cole says: September 25, 20122:17 am

    Also, does anyone experience issues with the 1st post not loading? My theme intermittently throws an ID related error. My premalinks are set to Post name; would changing it to default be a bad idea--break links and/or site?

  100. Cole says: September 25, 20126:17 am

    As for my 1st question title=0 at the end of the shortcode took out the widget title like I wanted.

    Still no leads as to why the most recent update will fail to load at random.

    ERROR: It seems that the selected page ID's are invalid

    • Patrick says: September 25, 201211:17 am

      Hi Cole,
      Can you please post the exact error that you are receiving. I don't think it has anything to do with permalinks but you might want to make sure the post doesn't have a blank permalink.

  101. Cole says: September 25, 201211:08 pm

    Hey Patrick,
    The error reads as the last line of my last comment. It's exclusive to the Flexibusiness theme so far as I can tell. The latest post does have a permalink; the error only hits the latest one.

  102. eraotomotif says: September 30, 201212:39 am

    One of the best plugins I use currently

  103. Joe says: October 2, 20122:32 am

    I can't seem to get the "ignore sticky posts" functionality to work. I've inserted the following code into the WP_Query Options section:

    "ignore_sticky_posts": "1",

    But this accomplishes nothing (link to sticky post is still displayed). Any help with this issue would be greatly appreciated. I am running WordPress 3.4.2 and iTheme2.

  104. Joe says: October 2, 20124:02 am

    I just tried another method by using this code:
    "post__not_in": [1, 60]
    and that hid the link for post #60, but not post #1 (the sticky post on the homepage). What gives??

  105. Joe says: October 2, 20125:20 am

    I've figured out the problem... there seems to be a conflict with plugins that put sticky posts on top of categories such as "Category Sticky Post" and "Sticky Posts In Category". If you could look into resolving this conflict, that would be great! In the meantime, I've switched to "Q2W3 Post Order" as a workaround.

  106. Andreas says: October 4, 20129:14 pm

    Is it possible to output the category name or category names of the post as well?

    • Patrick says: October 5, 20121:00 pm

      Have you tried using

      <?php echo get_the_category_list(', '); ?>

      in the Widget output template?
      Make sure you are running version 1.0.7 or later.

  107. Andreas says: October 6, 20121:29 am

    It works! Many thanks. I think it is very powerful plugin!

  108. Alex says: October 11, 20127:11 am

    how do i set the following to pull posts for the current posts/page author?

    "post_type": "post",
    "post_status": "publish",
    "author": "0", //author ID

  109. aintono says: October 12, 20123:56 am

    Hi guys!
    How i can set the value ALT of THUMBNAIL in widget? it returns only numbers (and i think it's only thumb's name).

    thank you!

  110. chris says: October 20, 201211:20 pm

    i use atahuapa theme on a blue host server.

    I downloaded and used recent posts plus widget in my left sidebar. Everything was ok until sometime today a "time executed in 0 seconds" appears after the title of recent posts widget.
    I've deleted and re installed the plug in, but i keep getting the same message.

    This probles also appears in other recent posts plugin that i've tried

    What seems to be the problem?

  111. Bart says: October 25, 20121:33 am

    Hi, The thumbnails option doesn't show on multi site installation......

  112. Janet says: October 27, 20123:05 pm

    I was able to edit the alignment of the text from within the widget settings (under Widgets) by clicking on "Show expert options" and then in the field labeled "Widget Output Template" I added the following code:


  113. Janet says: October 27, 20123:08 pm

    Ugh, sorry my code did not post properly. I'll try this again:
    <li><table><tr><td valign="middle">{THUMBNAIL}</td>
    <td valign="top"><a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>

  114. Craig says: October 28, 20126:34 pm

    Let me just say that this is a great plugin. I am using the plugin in the sidebar on the post page and I would like it to Exclude the current posts from the list. I have tried everything but nothing seems to work unless I explicitly state the post ID. How do I exclude the current post without knowing the post id?

  115. Daniella says: October 31, 20129:06 pm

    I am using the same code as Joe above to ignore sticky posts but it is not working. Could you please help me troubleshoot or tell me if there is a list of known plugin incompatibilities? Thank you.

    • Patrick says: November 1, 20125:28 pm

      Hi Daniella,
      The problem Joe had is caused by plugins that modify wp_query and prevent "ignore_sticky_posts" from working.
      Not much I can do about this really.
      Have you tried:

       "ignore_sticky_posts": "1"

      Note that the above is slightly different to Joes code since he had a misplaced comma.

  116. Daniella says: November 3, 201211:35 am

    Didn't work. Thanks, anyway!

  117. D says: November 7, 20125:46 am

    Fantastic plugin! Very customizable!

    Is there any way to get it to ignore the and tags?


  118. Carolyn Shearlock says: November 22, 20126:06 am

    I use the plugin in several instances and love it. I think the answer is NO, but I'll ask anyway: is it possible to get a similar output in a post using a shortcode?

  119. D says: November 28, 20129:21 am

    I've been checking back for a response and I just now realized there was a typo and my question didn't make sense!

    My question is this: Is there any way to get it to ignore the A, P and BR tags?


  120. Carolyn Shearlock says: December 16, 201210:50 am

    Is the plugin compatible with WP 3.5? I use it in several instances on my site and want to make sure before I upgrade.


    • Patrick says: January 8, 20139:52 am

      Yeah it is I haven't found any issues.
      Let me know if you have any problems.

  121. niki says: December 26, 20125:30 am

    Sexy Plugin . Thanks thanks thanks ♥ ♥ ♥

  122. Thirzah says: January 4, 20134:04 am

    Just FYI, the count value is messed up by featured/sticky posts.
    To counter this, I added to my WP_Query_Options:
    {"ignore_sticky_posts": "1"}

    But possibly this should be a general option somewhere or default, to stick to the right number of posts.

  123. Pam says: January 8, 20135:25 am

    Hi Patrick,
    I love this plugin! I have only question - I'd like to add the time to the output. I figured out how to add the date and get it formatted the way I want, but can't figure out the time. I'd like it to show up in this format: 9:58 AM. Is this possible? Thanks!

  124. Pam says: January 8, 20139:56 am

    Perfect! I just tweaked to display in the format I wanted (n/j/y H:i A). Thanks so much!

  125. geoff says: January 16, 201311:57 am

    I'm trying to get text to display from a category named 'career' in a custom post type I created named 'quote' but I'm not having any luck. I don't have any issues using "post_type" by itself; it's when i try to pull from a category with the custom post type. I have tried:

    "post_type": "quote",
    "quote_category": "career"


    "post_type": "quote",
    "category_name": "career"

    Any suggestions?

    • Patrick says: January 16, 201312:55 pm

      Hi Geoff,
      The second example you posted seems correct to me.
      Have you tried each parameter separately to see which one isn't working?

      "post_type": "quote"
      "category_name": "career"
  126. geoff says: January 17, 20131:48 am

    Hey Patrick, I appreciate the quick response. Yes, I tried both and only "post_type" works. It doesn't seem to filter out based on my category name even if I try different categories in 'Quotes'. Do you think it has to do the custom post type I created for Careers?

  127. geoff says: January 17, 20131:53 am

    Correction; for the last sentence, I meant to say "Do you think it has to do with the 'Quote' custom post type?

  128. geoff says: January 17, 20132:16 am

    Okay, I figured it out...instead of using "category_name" I had to use "quote_category" which I used when I registered my custom taxonomy for my custom post type of "Quote":

    register_taxonomy( 'quote_category', 'quote', $args );

    Again, thank you for taking the time to look into this; I appreciate the support on such a wonderful plugin.

  129. Keith says: January 18, 201310:02 am

    I love this plugin and the flexibility. The only problem is that my posts are **always** displayed oldest to newest. This is the JSON I am using in the WP_Query Options:

    "post_type": "post",
    "posts_per_page": "3",
    "cat": "-14",
    "orderby": "date",
    "order": "DESC"

    Is there any way to list all categories except for the single one I want to exclude? Thanks!

  130. Keith says: January 18, 201310:54 am

    Ignore that. It turns out it's an issue with my theme. I added wp_reset_query() to the plugin and it hosed the theme. Asking the theme designer....

    • Patrick says: January 18, 201311:02 am

      That is ok let me know what the outcome is.

      BTW I used the following on my testing server running 3.5 without any issues.

  131. Chad Langen says: January 22, 201312:02 am

    I have tried and tried to put a custom code in. I was just copying one of the example ones you posted and pasting it. I did this in the Stylesheet for my theme as well as the custom.css area but nothing is happening. I even used the file manager via my control panel and tried that way and still no luck. ANy suggestions?

    • Patrick says: January 22, 20139:20 am

      Hi Chad,
      Unfortunately changing the styling depends a lot on the theme you are using.
      Make sure you are posting the example CSS to the bottom of the css file.
      Other than that I can't help that much with styling because every theme is different and requires different CSS modifications.

  132. Suzanne says: January 30, 20131:50 am

    How do I make the thumbnail image clickable? Someone asked before but I never saw a reply. I would like for people to be able to click the thumbnail to get to the post - seems like it's what most people would try to read the rest.

    • Patrick says: January 30, 20139:53 am

      Hi Suzanne,

      Just edit the widget output template like this:

      <a title="{TITLE_RAW}" href="{PERMALINK}">{THUMBNAIL}</a>
      <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>
  133. Chaka says: January 30, 201310:40 pm

    Hi Patrick, first want to say that this is a brilliant plugin and just getting the hang of it. I'm using this on our home page for Latest Posts but I notice that the title starts at the middle of the image. I have tried to get it to align with the top of the image and then have the excerpt start immediately below the title but really cant get this to happen. Kindly advise.

  134. Brindle says: February 5, 20133:23 am

    I can't say enough good things about your plugin. This is the best one I have ever used. Its really well designed. I do have one request. Is it possible to add a default class name or ID to the tag, perhaps derived from the title? Perhaps recent-posts-plus-"title"?

    • Patrick says: February 5, 201311:20 am

      Hi Brindle,

      At the moment this isn't possible but I do plan to add this functionality eventually.
      The way I want to do it will likely break backwards compatibility so I've been avoiding making the update until it is tested more.


  135. Nicole Bateman says: February 5, 20133:55 pm

    Hi. Love this plugin and use it a lot for my clients. Question...it cant be used to query results from external URLs can it? So I could show thumbnails/excerpts from the recent posts of another blog, for example? Been searching for one but cant seem to find one and hoping this one would work, but perhaps not. Thanks for your time!

    • Patrick says: February 5, 20133:59 pm

      Hi Nicole,

      Sorry but this plugin can't be used for that. It would require parsing the rss feed from another blog.
      The RSSImport plugin might work for that see http://wordpress.org/extend/plugins/rss-import/ but I haven't tested it myself.

  136. Nicole Bateman says: February 6, 20133:38 am

    Thanks for the fast reply, Patrick! I will check out that plugin and I think I may have found another one that will work too. I was just searching with the wrong phrasing. Thanks again!

  137. Dan says: February 17, 20133:54 am

    I'm trying to make it easy for contributors to add a headlines section where just the headline title appears and clicking on the title goes to another website link. I've tried to add href="{EXCERPT_RAW}" but it links back to the existing site and not the link in the excerpt. How can I do this?

  138. Dan says: February 20, 201312:26 pm

    How can I add pagination? I'd like to offer a "previous" or "older" posts option.

  139. mike norris says: February 26, 20137:40 am

    I'm having an issue with the number count of articles being displayed. No matter what I choose it shows 6 posts in the categories i've chosen - categories with far more than 6 posts. Changing the number does nothing. Any ideas?

    • Patrick says: February 28, 20133:04 pm

      Hi Mike,
      That is a very strange issue. What WordPress version are you using? Also which theme?

  140. Jeroen says: February 28, 201312:42 am

    Hi your widget is super handy but is there a way to select only posts from a certain date onward, where the date is determined by the current date, e.g. show a list of all posts of the last 2 months? I could not find this option. Thanks for your reply.

    • Patrick says: February 28, 20133:02 pm

      Hi Jeroen,

      Sorry but this isn't possible quite yet. I will add it to the list of suggestions and try to get it working in a future update.


  141. mike norris says: February 28, 20133:12 pm


    The latest version (3.5.1?). Also, "TheSource" is the theme I"m using. I've messed with it a little more and can force the correct amount of post count in the query box but then it cancels out the line specifying category ID and the only way to get the correct category of posts to show is to remove the added line designating post count amount.

  142. Jeroen says: February 28, 20136:19 pm

    Thanks for considering the suggestion Patrick, for my website it will be super useful.

  143. Jill says: March 6, 20132:57 am

    The widget is great -- exactly what I have been looking for!

    However, when it renders on my WP install, the containing div does not get named ".widget_recent_entries" but instead the class on the div is just ".widget" making it impossible for me to style it without impacting all of the other widgets.

    It seems this might be the same problem Chad reported in the comments above in January. It seems to be a problem with the class outputted to the widget rather than a CSS problem -- the CSS in my custom code works a treat as soon as I assign it to the .widget class.

    Thanks in advance for any help you can provide.


  144. Jill says: March 6, 20136:32 am

    I forgot to add -- this is WP 3.5.1, if that is helpful.

  145. Chris Tusa says: March 8, 20134:20 am

    Great plugin. How do I avoid showing the actual post? I tried limiting characters to 1, but I don't anything to display.

    Thanks in advance,


    • Patrick says: March 8, 201310:13 am

      Hi Chris,
      Just change the widget output template and remove the {EXCERPT} tag like this:

      <a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a>
  146. Anne says: March 16, 20139:52 am

    Thanks for this great plugin. Can you tell me if it is possible to specify the date format of a custom field that happens to be a date? I am using {META[event-date]} in the query options. Thanks!

  147. Anne says: March 31, 20135:52 am

    In case anyone else ever has this question: I got a date from a custom date field to display in a normal date format by inserting the php directly into the Widget Output Template like so (replacing 'event-date' with whatever your custom field name is):


    There is probably a more elegant way to do it but that works.

  148. bbfriend says: April 4, 20139:22 am

    Hi Jill !

    Widget Output Template to


    and add style.css
    li.widget_recent_entries { ..}

    not ".widget_recent_entries li "

  149. bbfriend says: April 4, 20139:29 am

    I do not know how to display the HTML code in the comments here.


  150. Ed says: April 8, 20131:15 pm


    Is it possible to exclude the current post being viewed in the widget?


    • Patrick says: April 9, 20139:44 am

      Hi Ed,
      Sorry but that isn't possible yet.

  151. Kevin Weel says: April 9, 20137:58 am

    I'm looking to add a class to the li for the active page. Basically looking to highlight the current page in the recent post widget. is this feasible, and how do I implement in this plugin. Any help would be greatly appreciated.

  152. Kevin Weel says: April 9, 20136:46 pm

    Patrick, thank you very much...love the plugin, this would be a huge addition as there really isn't any support out there to make this seemingly simple task, easy for developer challenged.

  153. Mike Jones says: April 10, 201312:50 pm

    Patrick, I'm not sure if this is the same issue Kevin Weel, but I followed your link to your roadmap and to add my answer to your question:

    "The question is what to do if none of these parameters can be set. Is the widget hidden in that instance...
    Or maybe just ignore those options."

    I'd suggest that being able to choose between the widget being hidden or displaying a default message where the list would have displayed. In other words, if the query you set using your existing parameters cannot display any posts, then hide the widget or allow text to be displayed such as: "There are no posts for this category." Providing a field to set edit that text per widget would be ideal.

    Also, thanks for an otherwise fantastic plug-in!

  154. Marcin Biegun says: April 11, 201311:07 pm

    would be great to have one more expert parameter: unordered list or ordered list. In some cases ordered list is better choice and there is no way to switch it currently

  155. Anne says: April 12, 20134:23 am

    I'm trying to recover settings for Recent Posts Plus that I lost when I restored a backup of my site. Does anyone know the setting name to look for in the wp_options table in order to find Recent Post Plus settings?

  156. Anne says: April 12, 20135:23 am

    Found (it was quite obvious): widget_recent-posts-plus

  157. Kris says: April 14, 20133:49 am

    This widget is great, but I have a question.
    Is it possible that the widget display in the middle of a static page?
    If so, how should look the code?


  158. Charles says: April 21, 20138:17 am

    Hi, I am only one inch from loving this plugin.
    A tiny thing: these dots on the left of the posttitels.
    Don't know how they got there. Don't understand why they are there.
    Can't get rid of them.
    Is this a known issue? Haven't read about it here.
    Is there a way to get rid of them?
    Thanx in advance.

  159. Jennifer says: April 26, 20132:22 am

    For some reason, the "posts per page" option is not working for me. I've tried putting a number in the box and using the WP_Query Option: "posts_per_page": "3",
    Nothing works. Any ideas why that would happen?


  160. Chris says: April 26, 20134:10 am

    I am trying to add a custom field into the display, using the section in #11. I used the meta_query line, with a key. The value is determined in each post. The rest there is not needed (in my case). Well, nothing is happening and I'm at a loss to troubleshoot...
    If you check out my site, it's in the sidebar (try About page). I'm pulling in a custom post type ("testimonials"). It is the same last 3 posts from the "Client Testimonials" page. Trying to pull in custom field of the client name at the bottom of each testimonial.

    Gee...any guidance would be much appreciated :). Thank you.

  161. Jeroen says: May 2, 201312:18 am

    I have just chosen the option to add the EXCERPT to my widget, but this is appearing in a bigger font size than the title itself. When examining the HTML source I found this is because the {EXCERPT} is surrounded by the tag by default? If this wasn't included the same style settings as before would continue I think (I am not an HTML expert by any means, I am just guessing here).
    Can you help me out?
    Kind regards,

  162. Jeroen says: May 2, 20137:16 pm

    Hi, to add to my previous question, the website is http://www.igluu.nl and the tag around the {EXCERPT} is the P tag!

  163. Jennifer Erdman says: May 4, 20139:12 pm

    I'm having an issue with the thumbnails in the widget. For some reason they're all showing up blurry. Do you know why? Take look here: http://sparkleholidaydesign.com

  164. Chris says: May 14, 20136:27 am

    Is there a way to have the posts pulled be selected randomly? The widget allows for "Number of posts to show:", but is there a way to have them randomly rotated whenever the page is loaded?

  165. James Waterhouse says: May 15, 20139:38 pm

    Hi Patrick, Great plugin,

    I am using your plugin in my sidebar to show my most popular posts, is it possible to make each individual list item 'area' clickable and lead to the article itself?



  166. James Waterhouse says: May 15, 201310:01 pm

    Think I have figured it out, please correct me if i am wrong:

    In the widget ouput template put:



    Then in your css set the rppostarea to display: block

  167. James Waterhouse says: May 15, 201310:02 pm





  168. James Waterhouse says: May 15, 201310:03 pm





  169. KJ says: May 17, 20137:11 am
  170. Andy Kuiper says: May 23, 20132:11 am

    I am going to give it a try; I have a test website in mind... thanks Patrick :-)

  171. Malcolm Dayton says: May 27, 20137:53 am

    I'm needing to increase the Title Font Size in RPP, within the Thesis 1.85 Theme. Thesis offers an editable custom .css, but I have not been able to locate the correct coding that will change the font size. Thanks for your input in advance

  172. Malcolm Dayton says: May 27, 20138:01 am

    I just located the answer (& it worked great!) in a Nov 24, 2011 post!

    Thank you for a great plugin & a very informative forum!

  173. Angel says: June 1, 20132:05 pm

    First of all, thank you for this plugin. I am using it in my sidebar. However, there are small arrows to the left of each thumbnail. Do you know how I can remove the arrows?

  174. abdul rahman says: June 2, 20133:34 pm

    I have tried to do some off set posts setting in the widget but i have not succeeded so i need your help to make 12 posts offset .
    i have placed 12 posts on right side bar and now want to place next posts after 12th posts in left sidebar so i want to offset 12 posts.
    kindly write down a code to put it in wp querry opetion

    i will be very thankful to you

  175. abdul rahman says: June 2, 20133:36 pm

    also tell me to how to allign the title justify

  176. Jonathan says: June 4, 201311:54 am

    Is the PHP Raw option working correctly? The code below isn't working. Thanks.
    while(have_posts()) : the_post();
    echo '' . get_the_title() . '';
    while(have_posts()) : the_post();
    echo '' . get_the_title() . '';

  177. Anne says: June 6, 201310:15 pm

    Great plugin! I'm having a problem similar to Jonny007-MKD .
    My widget output template is: {EXCERPT} More... but the More... appears on a separate line whereas I would rather it were right after the EXCERPT
    Many thanks

  178. Anne says: June 6, 201310:29 pm

    Apologies, didn't know how to post the code, let see if this works:

  179. Anne says: June 6, 201310:31 pm

    Argh! {EXCERPT}<a title="{TITLE_RAW}" href="{PERMALINK}">More</a>
    thank you for your patience

  180. Rob says: July 3, 20136:12 am

    Hey Patrick, I am using your plugin with WP 3.5.1 I am trying to get the text/hyperlink to appear at the top right of the thumbnail, rather how it now appears bottom right, but I cannot seem to get it to work. I followed your instructions at the top of this article that shows how to "style the output", but I just cannot get it to work?

    I tried to add to style.css the following...

    .widget_recent_entries li {
    clear: both;
    margin: 5px 0;
    .widget_recent_entries .wp-post-image {
    vertical-align: text-top;
    margin: 0 5px 0 0;

    Any ideas?


  181. Mark says: July 11, 20137:54 am

    I was wondering if there was a way to add a static link at the bottom of the widget. I would really like it to direct it the complete page of posts.

  182. Kimberly says: August 24, 20133:59 am

    I can't get this to filter the category at all, no matter what I try! any hints or anyone else have this trouble?

    I've used both category options in the query options available and someones custom filter they posted above, i'm going crazy trying to figure it out

  183. Ron says: August 30, 20135:06 am

    Trouble getting date to diplay....... here is output template
    {date [M d Y]} {THUMBNAIL} {TITLE}{EXCERPT}

  184. Rocktivity says: September 3, 20135:39 am

    I can't get the offset to work -- exactly what coding do I place in the
    widget box?

  185. Rocktivity says: September 3, 20136:22 am

    I have the widget placed in the blog's front page sidebar -- how do I get it to stop showing up at the bottom of my posts?

  186. Mike says: September 5, 20136:40 am

    Do you have any plans for WP 3.6 compatibility in the near future?

  187. Yan says: September 6, 20138:50 pm

    Hi Patrick,
    I am trying to exclude password protected posts from my recent posts list.
    Is there a way to filter out this kind of pages?

  188. Carolyn Shearlock - The Boat Galley says: September 21, 20131:03 pm

    Hi Patrick!

    Back with another question . . . but it's been a while. I recently started making my featured image to the new size that Facebook is using (560x292) and it's working great where it's autoposted there with Jetpack. I still have the thumbnail set in Media to 200x200 and have the crop button checked. No matter what I do, the thumbnail that is used with this plugin isn't cropping to a square. I even tried setting the size with the php code, no dice -- it just shrinks the rectangle. Is there any way to get this plugin to use an image other than the thumbnail/featured image? Or do you have another idea?

  189. Carolyn Shearlock - The Boat Galley says: September 21, 20131:09 pm

    Never mind. I did some more Googling and got the idea that Jetpack Photon might be the problem. Turned it off and all is well.

  190. jialing says: September 24, 20135:17 am

    This is a great plugin. I like it.
    The only request I have is to use it on a multibyte string site, the code is better to use mb_strpos instead of stripos. Otherwise, some weird characters would display at the cut of excerpts.

    FYI: http://php.net/manual/en/function.mb-strpos.php

    Thank you!

  191. www.qtdd.com says: October 1, 20136:49 pm

    It could be a great and also helpful little bit of info. I'm happy which you simply contributed this useful information with us. You need to stop us current this way. Appreciate revealing.

  192. Deborah says: October 8, 20138:06 am

    Thank you for this great plugin! I have one problem that I hope you can help me with. I would like to display my images all the same size (80x120) whether they are portrait or landscape without getting distorted. I inserted the following code and regenerated the thumbs but they are still stretched.

    .wp-post-image {
    margin: 0 9px 0 3px;
    padding: 3px;
    border: 1px solid #e3e3e3;
    width: 80px;
    height: 120px;

    Thank you in advance!

  193. margaritaperc says: October 11, 20133:46 am

    It would be really fantastic to integer in the widget output a {TAXONOMY} option.
    Right now I'm using a php raw code to call the taxonomy terms, but apparently it slows down the speed. Does it? Or is there another way?

    The code that I use right now:

    ID, 'actors' );

    if ( $terms && ! is_wp_error( $terms ) ) :

    $actors = array();

    foreach ( $terms as $term ) {
    $actors[] = $term->name;

    $actors = join( ", ", $actors );



    Thanks a lot for the fantastic plugin. I'm using it all over my website!!

  194. Olivier says: October 16, 20138:27 am

    Hello Patrick !

    Thanks a lot for your fantastic plugin !
    I m sure it will be really helpful in the future, but for now, I seem to have little issues with it...

    On http://www.frenchkoukoku.fr , the redirect link seems to add before the permalink, the webpage adress.

    Not sure if I'm getting clear with this, so, effectively :

    when I should be redirected to :

    The Recent post link takes me to the 404 hell with :

    Is there something wrong with my plugin installation, or does it have some compatibility issues with the theme (Encounters pro) ?

    Thanks a lot for your answer !

  195. Shaan Nicol says: November 20, 20138:23 pm

    Awesome plugin!

    Is it possible to do something like this?

    global $post;
    $slug = $post->post_name;

    "category_name": $slug

  196. Ted says: December 6, 20133:57 am

    How do I manipulate the Widget Output to increase the font size of the title? I am using the Genesis platform. Thanks for your assistance!

  197. funkyD says: January 2, 201410:29 pm

    Hi, Great plugin.
    I've got quick question.
    If i set only a parent cat, does it gona retrieve only parent cat ? or child cats included.
    I'm willing to enter only parent and have all child cat post included, is it a way of doing that ?

    Thanks in advance.

  198. Marinda says: January 16, 20142:23 am
  199. Marinda says: January 16, 20142:27 am

    Hi, Thank you for this fantastic plugin!
    Please can you assist me with the following: I have enabled the 'Include post thumbnail' option, but do not see the image from the post in the sidebar. Is there a way that I need to save the image to be seen as a thumbnail? Also, I would like to change the heading to be bold. I am new to html coding and really appreciate your help. Thanx!!

  200. Aga says: January 22, 201412:29 pm

    Hi there, many thanks for this great plugin!
    Is it possible to display posts from two different post types? I have a custom post type "listing" and would like to display both "listing" posts and regular posts ordered by date.
    Thanks in advance for your help!

  201. Valentin Ionel says: February 25, 20142:41 am

    WP_Query Options (?)
    "post__in": [1330,1125,970,128,113,1351]
    Widget Output Template (?)
    No matter where I put post no. 1351 in the list, he always comes first in the list. Why ? What can I do? Thank you!

  202. Damiaan van Vliet says: February 27, 20141:49 am

    Hi Patrick, thanks for your great plug-in. Still the best plug-in for displaying all kind of posts in a nice way. Question, is it possible to show the "read more" tag behind the excerpt instead of below the excerpt? Code I use:

    {EXCERPT}read more


  203. me here says: February 27, 20147:56 am

    what code will make the recent post list be alphabetical?

  204. rsspanic says: March 10, 201411:42 pm

    Hi, I would like to know how it might be possibler to

    1) show a gray 1 pixel wide frame around the recent posts widget;

    2) show a 281x61 pixel large jpg as a standard header above the widget (but inside the frame above)


  205. Goran says: March 21, 201411:16 am

    Like many other I also have the problem to pull latest post from specific category. Iz pulls latest posts from all categories. My querys are fine. Do not know what to do. :(

  206. Peter says: April 18, 201412:21 am

    I am using Version 1.0.11 and it appears to be stripping hyperlinks from excerpts again. I saw this was a problem back in 2011 with version 1.0.5 and was apparently fixed in a version after that. Is this still a bug?

  207. Kimberly R. says: May 13, 20144:38 pm

    We are using this widget to display "recent news" on all landing pages except for our homepage - Here is our bug: new postings are showing in Safari on Mac but not Chrome on Mac. Still need to test other browsers. I am not a JS expert, so please help. Thank you.

  208. Johnc152 says: May 16, 20141:50 am

    Very informative article post.Really looking forward to read more. Fantastic. eeccafgecbek

  209. Chris says: June 19, 20144:52 am

    How would I put the whole widget within it's own container? or put it within its own class?

  210. Ritchie Blogfried Pettauer says: July 11, 201410:13 am

    Hi Patrick, I just wanna say: THX for your *AWESOME* plugin! I've been using RP+ for a couple of years now - it's still by far the most flexible solution I've ever come across. I hope you'll keep supporting this genius piece of software for a long, long time! greetings from Vienna, Ritchie

  211. patti says: August 9, 201411:02 am

    I can't make this work. I want to hide a category. "cat": "1, 2, -3", //category ID 1, 2 but not 3 in the widget query options. not sure how to find the category number of the one I want to hide but I only have 5 categories and I've tried minusing all of them and no luck.

  212. Dan says: August 19, 201410:08 am

    I can't seem to get the offset to work.
    "offset": "20",

    It's still starts at first post

  213. Dan says: August 19, 201410:17 am

    Nevermind. I got it to work. I included a comma after last query option

  214. bahuett says: August 23, 20142:27 am

    if you are using page builder and you want to address recent posts or their images u may want to go this way

    *[class*='widget_recent'] .wp-post-image {

  215. bahuett says: August 23, 20142:29 am

    (for css of course)

  216. Barbara says: August 29, 20149:30 am

    Is there a way to specify which thumbnail to use? For example, my theme has a square thumbnail called "archive-thumb" and I would like to use this rather than the default thumbnail which is rectangular.

  217. Carolyn - The Boat Galley says: August 30, 20148:50 am

    I've been using the plugin for several years and it's worked great. Suddenly, the "rand" part isn't working -- it just shows the newest post(s) of the given group. Any ideas as to why? or more, importantly, how to fix it?

  218. Carolyn - The Boat Galley says: August 31, 201411:24 pm

    Never mind. Figured out that it's WP Engine that blocks "rand" and I just switched my hosting to them.

  219. lowongan kerja says: September 4, 20148:59 pm

    Hi i have download and installed this plugin on my site but the widget does not appears on my sidebar, how to fix this issue.. thanks

  220. Thanveer says: December 5, 20144:18 pm


    I want to display the post with three categories. Like
    * Featured
    * Latest
    * Most Popular

    As of now I have added only two post. One with Featured category and another one with Latest catgory.

    But its showing same post in both blogs. Kindly suggest any idea to do this. Looking forward to here from you.

  221. Gino says: December 11, 20143:10 am

    In "Ordering by custom links" chapter, there's an error:

    "meta_key" => "rating"
    should read:
    "meta_key": "rating"

Submit comment