Configuring the Post Plugins


Unfortunately, due to ill-health, these plugins have not been developed or supported properly for some years. They still work under most circumstances with the latest versions of WordPress (including on this website) but could possibly conflict with any WordPress features added after 2008 — e.g. custom post types — if you use them.

The post plugins, Similar Posts, Recent Posts, Random Posts, Popular Posts, and Recent Comments, should work ‘straight out of the box’. For example:


will display an unordered list of links to the five posts most relevant to the current one.



will show a list of the five most recent comments and their authors (the extra code protects your site from breaking if you should ever deactivate the plugin).

You can style the lists any way you like by playing with your theme’s CSS.

If the latest version of the Plugin Output Cache is installed the post plugins (apart from Random Posts) will have their output cached for efficiency.


We saw above that you can place the output of the post plugins anywhere you want by editing the code of your theme files. You might, however, not feel comfortable doing that or you might not like to re-edit the theme every time it is updated: the Post Plugins offer several other ways of placing their output without touching your theme files.

If your theme is designed to use widgets you can use the Presentation/Design admin menu to place the plugins as widgets into the sidebar (or anywhere else the theme allows). The plugin’s Placement submenu also lets you pass a parameter string (see below) to the widget and/or decide which pages it should appear on.

You might instead want to place the plugin output after the content of your posts. The plugin’s Placement submenu lets you do just that. Again you can pass a parameter string and/or choose which pages should show the output (e.g., ‘is_single()’ will keep output off the front page and just on single post pages; ‘!is_single()’ will do the opposite). If other plugins are also adding their output after the body of a post the order in which they appear can be important. By adjusting the priority of the the plugin’s placement you can achieve the order you want.

The Post Plugins can also append themselves to your site’s feed. The settings are again reached from the Placement submenu.

Finally, the plugins can be injected into individual posts and pages by inserting special place-holders. The content filter option must be turned on from the Other submenu. The place-holders look like this:


If the content filter is off the place-holder is invisible but otherwise is expanded to display the plugin output. You can pass a parameter string to the place-holder, e.g., <!--RandomPosts limit=2-->.


What if you want just three items in the list? Or what if you want to include an indication of how many comments each post has? You need to configure the plugin’s if you want just three items in the list? Or what if you want to include an indication of how many comments each post has? You need to configure the plugin’s settings.

Each of the post plugins has a Settings page which is accessible if you are logged in with the capability to manage options–in the role of administrator (WordPress 2+) or user level 8 or above (before version 2). All the settings are listed below. Most of the options apply to all of the plugins.

Beware of choosing settings which are contradictory (e.g., include and exclude the same post) or so restrictive as to reduce matches to zero (e.g., matching both the current post’s category and tags).

Number of posts to show
The default is 5.
Number of posts to skip
Allows you to start part way ‘down’ the list of posts. For example, you could call Recent Posts twice, once with skip set to 0 and once set to 5 to produce a two-column listing. The default value is 0.
Omit current post?
On some occasions you may want the current post to be dropped from the output. By default Similar Posts omits the current post while the other post plugins include it.
Show password-protected posts?
By default posts which are password-protected are not shown but they can be included by setting this option.
Show static pages?
WordPress has static pages as well as the normal flow of posts. You can choose to show both pages and posts or either one alone. By default, only posts are included.
Show attachments?
WordPress stores attachments (or links to them) among normal posts and pages. You can choose to show them if you wish. By default, they are not included.
Show by status
WordPress assigns posts a status, e.g., whether they are published or not. This option lets you display posts with chosen states: published, draft, private, and future.
Ignore posts older or newer than…
Sometimes it is useful to only include posts that are more than, or less than, a certain number of days, months, or years old. A news site might want to show random posts from the last week, for example.
Match posts by custom field
If you wish you can use the very flexible post-meta system to select posts. At the most basic you can limit matches to posts where a specific custom field exists. You can also check that a custom field has a certain value. The ‘LIKE’ operator can be used with wildcards (‘_’ matches any single character, ‘%’ matches zero or more characters). You can even use the MySQL REGEXP operator for complex matches. Please bear in mind that matching by custom field may slow down the plugin considerably.
Limit matches to same category?
By default, posts from any category are included but it can sometimes be useful to restrict the display to just those posts which share at least one category with the current post.
Match the current post’s tags
This option (only available for WordPress 2.3+) uses the current post’s tags to restrict the output. It can look broadly for posts with any of the tags, or strictly for all of the tags. If the current post is untagged or there are no matching tags the normal output is produced
Match the current post’s author
This option let’s you restrict output to posts which share the current post’s author
Default display if no matches
Occasionally, for whatever reason, a plugin has no items to display. By default it displays instead the text 'None Found' but you can change the message to fit your blog or language. You could even include a link,say, to your ‘about’ page. The before and after settings are ignored but if you embed output tags they will be expanded.
Show nothing if no matches
As an alternative to displaying a default message, this option causes the plugin to produce no output at all (from v. also works when the pluginj is used as a widget).
Text and codes before the list
Lets you specify text and HTML before the list of items, e.g., to title the list. By default is used.
Text and codes after the list
Lets you specify text and HTML after the list of items. By defaultis used.

Output template
The output template specifies what gets displayed for each item in the output. For example, the default output template for Recent Posts is

  • {link}


. Read from left to right it governs the output for each item in the list of recent posts. In this case it is a beginning and ending HTML list tag with something in between. The code, {link}, gets expanded for each item — and displays the post’s permalink with the post title as the text and the date of posting as the ‘tooltip’.
The output template treats anything between ‘{‘ and ‘}’ as a special instruction or tag. A full list of output tags is given below. The tag system allows you to customise the plugin’s output to a high degree, for example,

{link} by {author} ({commentcount} comments)
{snippet:50} …
outputs each item as part of a definition list showing the permalink, the author, and the number of comments the post has, followed by a 50-character snippet of the content and a trailing ellipsis.
The exact way these elements are displayed depends on your theme’s CSS. Applies to each plugin.
Text to trim at start replaced by ‘divider’
usually the plugin output will be some kind of list with each element sandwiched between matching tags. Sometimes, though, you might want to have the output separated rather than wrapped: a comma-separated sequence of items would be an example. The output template ', {link}' would basically do the trick but would produce an unwanted ', ' at the front of the first item. This option lets you enter ', ' and have the offending comma and space trimmed neatly out of existence.
usually the plugin output will be some kind of list with each element sandwiched between matching tags. Sometimes, though, you might want to have the output divided rather than wrapped: a comma-separated sequence of items would be an example. The output template '{link}' would basically do the trick but with divider set to ‘, ‘.
Authors to exclude/include
By default the plugin selects posts with no attention to who wrote what. By checking the appropriate boxes you can include or exclude posts by certain authors.
Posts to exclude
By default the plugin considers all matching posts in preparing its output. By including a comma-separated list of post IDs you can exclude particular posts from consideration.
Posts to include
By default the plugin considers all matching posts in preparing its output. By including a comma-separated list of post IDs you can only consider particular posts.
Categories to exclude/include
By default the plugin selects posts without caring how they are categorised. By checking the appropriate boxes, however, you can exclude or include posts in certain categories.
This option (available for WordPress 2.3+) lets you specify a tag or list of tags to filter the output. For example, TAG A selects any post with that tag; TAG A, TAG B selects any post with either tag; and TAG A + TAG B selects only posts with both tags.
Other plugins’ tags to remove from snippet
If {snippet} is present in the output template the plugin tries to produce a simple glimpse of the post’s content without HTML or markup. However, many plugins insert pseudo-tags of their own which can mess up the snippet. If you want these tags to be fully expanded you can use the {excerpt} output tag instead but if you simply want them cut out from your post you can specify a set of opening and closing pseudo-tags to be removed.
For example, '[tag]' and '[/tag]' will cut out the whole of '[tag]embedded stuff[/tag]' while '[' and ']' will remove '[insert stuff here]'. In these examples it would be very important to place '[tag]' above '[' so they are removed in the right order. Pseudotags which contain modifiers, e.g., [quote comment=12], can be removed with the aid of a wildcard, e.g., [quote.*].
Content filter
Ordinarily, the plugin’s output is displayed wherever you place the tag in your template or, alternatively, where you place the corresponding widget. This option offers a third method of placement: a filter which looks for embedded tags in content. For example, the tag <!--SimilarPosts--> placed in the body of a post would be replaced by a list of similar posts. This lets you insert plugin output on a post by post basis. Use <!--SimilarPosts-->, <!--RandomPosts-->, <!--RecentPosts-->, , or <!--RecentComments-->. You can pass a parameter string to the plugin by putting the string after the tag, e.g., .
Note: even when the content filter is active the tags will not be expanded if they are being shown via one of the plugins, e.g., if Recent Posts is showing the excerpt of a post with a tag in it, the tag cannot be expanded with infinite recursion.
Sorted/Grouped Output
Each plugin produces a number of items sorted in the most usefulmanner for that plugin but you might want to sort the items differently. With these options you can sort the output according to the value of any (combination) of the output tags (though obviously some tags make little sense). You can sort in ascending or descending order and, where relevant, ignore case or not.These options let you choose two levels of sorting. Items will be sorted by the first set and then by the second. It is also possible to specify a group template so that groups of items which sort together can be titled appropriately. Note: The sort order does not change the output of the plguin, only the order in which it is displayed.

Group title template
This ‘title’ for each sorted group of items is specified in exactly the same manner as the output template. It appears whenever the primary sort tag changes.

The following options are only available in Similar Posts:

Maximum number of words to use for match
By default Similar Posts selects 20 words from a post to make its matches but this value can be adjusted to give the best results for your blog.
Relative weight of post title, content, and tags
Similar Posts lets you adjust the contribution the current post’s title, content, and tags make when looking for a match. The three numbers are specified as percentages and should add up to 100. Choose what works best for your particular set of posts.
Manual links
If this option is switched on you can use custom fields to override the automatic matching algorithm. From the write/edit screen enter a custom field named ‘sp_similar’ with the ID of the post or page to which you wish to make a manual link. Multiple links can be made with a comma-delimited list of IDs.
Term extraction algorithm
The quality of the automatic matches depends on the extraction from a post’s content of key terms which represent the post’s meaning. The original algorithm uses relative word frequency to pick terms. You can also choose a more sophisticated method which uses TextRank to extract key terms. In general this leads to better similarity scores but that may or may not correspond to the user’s sense of similarity.
Add output to feeds
Appends a similar posts list to feeds. Previously this was handled by a separate plugin.

The following options are only available for Recent Comments:

Show only one comment per post
The plugin usually lists all comments but you can choose to show only the latest comment for any post.
Type of comment to show
In addition to ordinary comments there are trackbacks and pingbacks. By default Recent Comments only displays ordinary comments but you can choose to show all kinds of comment or just trackbacks and pingbacks.
Type of grouping
The list of recent comments is usually displayed according to the order in which the comments were made but sometimes you might want to group comments by post or by commenter. If you choose to group the comments you may well want to give each group a heading using the group template. (This option is a specific case of the many ways of sorting the output — basically it overrides any sorting options)
Show just current post
Sometimes you want to only list comments for the current post.
Omit author comments
By default the plugin lists all comments but you might want to exclude comments by the author of the post itself. Note that this option relies on the author being logged in while commenting.
Omit user comments
By default the plugin lists all comments but you might want to exclude comments by registered users of your blog. Note that this option relies on the author being logged in while commenting.

The following option is only available for Recent Posts:

Select posts by date modified
Instead of the usual behaviour of ordering output by date of creation you can chose to select the posts which have been changed most recently.

Output Template Tags

Several output template codes or tags were mentioned above. They offer a very flexible way to tell the plugin what aspects of a post to display and new tags are easily added to extend a plugin.

For example, {author} expands to the name of the post’s author and {date} becomes the date the post was created. An output template of 'by {author} on {date}' might expand, for example, to ‘by Rob on January 1, 2007’. Dates, however, can be expressed in different ways. By default {date} uses the same date format as the blog but if you wanted a different format you could specify it as a kind of parameter to the {date} tag. For example {date:Y} would just give the year in 4-figure format.

The general form for an output template tag is '{tagname:parameter1:parameter2:...}', where the curly brackets identify the tag as a tag, the ‘tagname’ picks out the tag from a list of valid tags, and the optional ‘:parameter’ allows some output tags to be fed extra data. If a tag can take a parameter and none is supplied a default value is used and if a tag cannot handle a parameter and one is supplied it is ignored.

The various output tags call the same internal filters as WordPress does so that, if, for example, you have installed a plugin to translate foreign-language characters, the plugin output should also be translated.

The current list of tags is as follows (colon indicate the tag has parameters)

The post’s title. If maxlength is specified the title wraps after that many characters. Method can be ‘wrap’, ‘chop’ (which simply truncates), ‘trim’ (which chops but adds an …), or ‘snip’ (which puts the ellipsis in the middle.
The post’s permalink as a url. See {title} for parameters.
The ID column of the post’s entry in the database.
The name of the post’s author. The default method ‘display’ uses the author’s display name; ‘first’ uses the first name; ‘last’ the last name; ‘full’ is equal to ‘first last‘; and ‘reverse’ to ‘last, first‘.
The url of the permalink to the archive of the author’s posts.
The date the post was created — a date format can be specified or the blog’s default will be used, e.g. {date:Y, F} would print something like ‘2007, January’. A format of ‘raw’ gives a value sueful for sorting.
The date the post was last edited. See {date} for parameters.
The time the post was created. See {date} for parameters.
The time the post was last edited. See {date} for parameters.
An excerpt of the post. Maxwords is the desired size of the excerpt (defaults to 55). Method, which can be ‘a’ or ‘b’ governs the way the excerpt is generated: ‘a’, the default, uses the same method WordPress itself employs, taking the post excerpt if available or the post content if not, stripping tags and then truncating to length; ‘b’, respects embedded '<span id="more-523"></span>' tags and tries much harder to preserve formatting. The more parameter, which only applies to method b, lets you specify the text and codes to append to the output (by default, ‘ …’). If the link parameter is ‘link’ whatever you have chosen in more will be linked back to the post. If you set a value for sentences no more than that number of whole sentences will be included in the excerpt. If sentences is set to 0 the excerpt will be trimmed to the end of the last full sentence less than maxwords.
A lightweight extract from the post, stripped of tags (and pseudotags). For example, {snippet:50} gives a snippet 50 characters long. The default is 100. Method defaults to ‘char’ but can also be ‘word’ which measures in words instead. Both approaches attempt to handle multibyte characters correctly. See {excerpt} for other parameters.
Delivers the full post with all relevant filters applied.
The names of the post’s categories, e.g., {categorynames: | } might produce ‘wordpress | plugins’. Note that the separator parameter needs no quotation marks.
As above but with hyperlinks to the appropriate category pages
The ID of a post’s principal category, i.e., if a post has several categories in the same hierarchy it chooses the most specific; if a post has more than one category the first (i.e., numerically smallest) is chosen. This is most useful when posts have only single categories and can be employed, for example, to display specific icons etc.
The number of comments associated with the post. If the extra parameters are supplied different text will be used according to how many comments, e.g., {commentcount:no comments:comment:comments} will give ‘no comments’, or ‘1 comment’, or ‘2 comments’. If the parameters are not supplied a bare numeral is output.
Shorthand for '<a title="{date}" href="{url}" rel="bookmark">{title:maxlength:method}</a>'
The contents of the custom field with the given name. Useful in cooperating with the many other plugins which use custom fields.
The post’s tags. For example, {tags:|} might give ‘wordpress|plugins’. The default separator is ‘, ‘.
The post’s tags as clickable links to the relevant tag pages. The default separator is ‘ ‘.
The number of posts in the blog.
The number of pages in the blog.
The output generated by treating code as genuine PHP. This powerful tag should be used with great care as it allows arbitrary code to be executed. You can, for example, incorporate WordPress template tags or other plugin tags into your output.
Write your code as though echoing to output and be careful to remember your semicolons, e.g.,
{php:$s=' '.strtoupper("hello world").' '; echo $s;}
The {php} has access to the $result object variable which contains the values of the columns of wp_posts for the post in question, e.g., $result-&gt;ID is the post’s ID.
Putting {php:random_posts();} as what to display if no real matches are found provides a fallback display.
You can also include other output tags in your PHP code: just remember that they are not PHP variables but evaluate to literal text and may need to be wrapped in the appropriate quotation marks.
Tries to discover how often a post has been viewed by using any of a number of popular plugins. Let me know if the plugin you use isn’t catered for.
An <img alt="" /> element, if any exists, from a post’s content. By default, the first image is chosen but number can be used to select another (counting from 0 as the first). If width and height are given (as pixels) the image is scaled accordingly, otherwise it displays full size. If the height is omitted width is used to define a square bounding box into which the image must fit. If either width or height is given as ‘?’ the other of the pair is taken as fixed and the image scaled accordingly. The value of timing decides whether the image is extracted before or after WordPress applies its filters to the post content. The default is ‘pre’ but ‘post’ can be specified when, for example, a gallery plugin inserts images only after processing. If the link parameter is given as ‘link’ then only images wrapped in links will be extracted and displayed. Finally, the default parameter can be used to give an <img alt="" /> tag to output if no ne is found in the content.
An image location, if any exists, from a post’s content. By default, the first image is chosen but number can be used to select another (counting from 0 as the first). The value of timing decides whether the image is extracted before or after WordPress applies its filters to the post content. The default is ‘pre’ but ‘post’ can be specified when, for example, a gallery plugin inserts images only after processing. The suffix parameter lets you add a string to the end of the image’s name, e.g., {imagesrc:0::xxx} might return ‘http://path/photoxxx.jpg’ instead of ‘http://path/photo.jpg’. There are two special values of suffix, ‘?t’ and ‘?m’ which use the current settings for thumbnail and medium image sizes to give the name of a reduced image, e.g., {imagesrc:0::?t} might give ‘http://path/photo-150×150.jpg’.
An image tag’s alt attribute, if any exists, from a post’s content. By default, the first image is chosen but number can be used to select another (counting from 0 as the first). The value of timing decides whether the image is extracted before or after WordPress applies its filters to the post content. The default is ‘pre’ but ‘post’ can be specified when, for example, a gallery plugin inserts images only after processing.

In addition, Recent Comments, has the following tags

An excerpt from the comment, applying filters, and stripping tags (apart from smilies if they are activated). For example, {commentexcerpt:20} would give a 20 word excerpt. The default is 55. See {excerpt} for the further parameters.
{commentsnippet:number of characters:method:more:link}
A lightweight extract from the comment, stripped of tags. For example, {commentsnippet:50} gives a snippet 50 characters long. The default is 100. See {excerpt} for the further parameters.
The comment’s date (local timezone). See {date} for parameters.
The comment’s time (local timezone). See {date} for parameters.
The comment’s date (UTC/GMT). See {date} for parameters.
The comment’s time (UTC/GMT). See {date} for parameters.
The comment author’s name. See {title} for parameters
The url left by comment author. See {title} for parameters.
A link to the comment author’s url or, if none was given, just the commenter’s name. See {link} for parameters.
The IP address of the commenter. It can be used, for example, to display an appropriate national flag.
The comment’s permalink as a url.
The url to include in a link to open the comment popup window if the theme allows such.
Shorthand for '<a title="{commentdate} at {commenttime}" href="{commenturl}" rel="bookmark">{commenter} commented on {title}</a>' an alternative to the ‘ commented on ‘ bit can be supplied as the text parameter. The {title} tag is wrapped in a span with class ‘rc-title’ and the {commenter} in a span with class ‘rc-commenter’, so that they can be styled by CSS. <code><code>'

  • {commentlink}

is the default output template for Recent Comments.

Shorthand for '<a title="{commentdate} at {commenttime} on {title}" href="{commenturl}" rel="bookmark">{commenter}</a> - {commentexcerpt}…'.
Displays a globally recognised avatar based on the commenter’s email address. By default, size is 96px. The ‘default’ parameter lets you specify the uri of an image to use when the commenter has no gravatar. Alternatively, you can specify ‘wavatar’, ‘monsterid’, or ‘identicon’ to have an individualised image returned as default.

Similar Posts, has one tag all to itself:

A measure of similarity ranging from 0 to (very) roughly 100 for an identical post.

There is one special tag which can be used in each plugin:

Lets you specify output conditionally according to the boolean value of condition. If condition evaluates to true the value of yes is output, otherwise the value of no. If yes and/or no are not given they default to the blank string. The conditionmust be a valid PHP expression; it can use WordPress or plugin functions; it has access to the $result object giving the contents of the current item’s row of the posts table; it can even contain further output template tags (but only one level of nesting of ‘{}’ is allowed.In addition, yes and no can contain output template tags of their own. For example, you might want to produce different output depending upon whether the current item is a page or a post:
Notice the nested tags with {} within {}. Only one level of nesting is allowed.

Parameter Strings: Overriding the Options Page

Using the Options/Setting page and, in particular, the output template, the behaviour of each plugin can be fine-tuned in many different ways. But what if you wanted to use, say, Similar Posts in more than one place in your blog. You might want to have a comma-separated list of three related posts under each post on your blog’s front page but an unordered list of 5 related posts in the sidebar of your single-post pages. Somehow you need to give each use of the function different instructions.

Let’s start easy. Suppose we have set up our settings page to deliver the three links under each post of the main page. We can just use similar_posts() in the right place to get that effect but then we need to override those options when we call similar_posts in the sidebar. We can override an option by passing a ‘query-string style’ argument list to the plugin template tag, e.g., similar_posts('limit=5') tells the plugin to show 5 items rather than three.

To override more than one option at once an ‘&’ is used. In our case we need to override three options: ‘limit’, ‘output_template’, and ‘divider’ (the full list of option names is given below), i.e.,



Notice that 'divider=' assigns an empty string to the option.

It might happen that you need to specify a value that already contains an ‘&’. In that case you can override the default separator by making the query-string begin with ‘&’ followed by whatever character you want to use in its place, e.g.,
'&amp;|title=Bed &amp; Breakfast|limit=10'.

The full list of parameters is as follows:

the maximum number of posts to show
unique (for Recent Comments only)
show only one comment per post
how many posts to skip before listing
just_current_post (for Recent Comments only)
restrict output to the current post
exclude the current post from output
include password-protected posts (true/false)
include static pages (false/true/but)
include attachment pages (false/true)
include published posts(false/true)
include private posts(false/true)
include draft posts(false/true)
include future posts(false/true)
restrict matches to current post’s categories (true/false)
restrict matches to the current post’s tags (false/any/all)
restrict matches to the current post’s author (true/false)
show_type (for Recent Comments only)
which comments to show (all/comments/trackbacks)
num_terms (for Similar Posts only)
number of words used to generate matches
weight_title (for Similar Posts only)
weight given to title (0.0 — 1.0)
weight_content (for Similar Posts only)
weight given to content (0.0 — 1.0)
weight_tags (for Similar Posts only)
weight given to tags (0.0 — 1.0)
hand_links (for Similar Posts only)
whether to check for manual links (true/false)
term_extraction (for Similar Posts only)
the algorithm to use to get key terms (frequency/pagerank)
what to show if no posts match
no output at all if no posts match (true/false)
text and code before the list
text and code after the list
what to display
text or codes between items
date_modified (for Recent Posts only)
select output by date modified not date created (true/false)
group_by (for Recent Comments only)
how to group list of comments (none/post/author)
what to display before each group of comments
select posts by tag; ‘taga, tagb’ selects posts with either tag; ‘taga + tagb’ selects posts with both tags
comma separated list of post IDs to exclude
comma separated list of post IDs to include
comma separated list of author IDs to exclude
comma separated list of author IDs to include
no_author_comments (for Recent Comments only)
omit comments by the post author (true/false)
no_user_comments (for Recent Comments only)
omit comments by the post author (true/false)
comma separated list of category IDs to exclude
comma separated list of category IDs to include
scan posts for embedded tags (true/false)
how long a time
name of custom field
comparison operator (=,!=,>,>=,<,<=,LIKE,NOT LIKE, REGEXP, EXISTS)
value of custom field
output tag(s) to sort by
‘true’ or ‘false’
output tag(s) to sort by
‘true’ or ‘false’

Extending the Plugins by Adding Your Own Output Template Tags

Let’s say you have another plugin that generates output which you want to include in your recent posts list. It’s actually an easy job–it just means adding a your own code in one place.

Each template tag is defined in the library file /post-plugin-library/output_tags.php as a function with the name ‘otf_tagname‘. So, for example, the {postid} output tag corresponds to the function otf_postid(). The function signature is as follows:
function otf_postid ( $option_key, $result, $ext ) { ... }
where $option_key is the key to the plugin’s options (via get_option()), $result is the particular row of the query result as an object with all the database columns available, e.g., $result->ID or $result->post_title, and $ext is the ‘extra’ data passed along to the tag after the colon. Each output tag function returns the tag value as a string.

Looking over the existing output tags should give you the idea.


  • 1. shedmore  |  February 8th, 2008 at 1:24 am

    Hello I am noticing that when I use {link}{excerpt:10} it works great !…but if there is a break between an image (that lies above all text in the post) it picks up the break, and converts it into a slight indentation in the recent post excerpt…is there anyway to filter that out of the excerpt?

    I use a break to pad the text below images on posts regularly, and the small indentation is a bit akward looking


  • 2. Rori  |  February 8th, 2008 at 4:38 am

    I can’t figure out how to make this not conflict with the recent posts widget in my theme.

    I want one recent posts that shows all posts and one that shows only the posts from one category.

    Can this one do that?

  • 3. Rob  |  February 8th, 2008 at 10:18 am

    shedmore: Perhaps the quickest way would be to do it with CSS — if you can isolate just the break in the context of the plugin output and set it to not display.

  • 4. Rob  |  February 8th, 2008 at 10:28 am

    Rori: I’m wondering whether the widget is the built-in one or my plugin as widget?

    When you are using my plugin as a widget you can set whatever options you like but it will show up everywhere according to those options.

    If, however, you insert the plugin directly into your template you can do two things: first, you can use the WordPress functions like is_single to decide what shows on which pages; and second, you can pass a parameter to the plugin template tag adjusting the options in any way you want. The details are set out above.

    Good luck!

  • 5. Mark Tyhurst  |  February 15th, 2008 at 4:11 pm

    Hello, I am kinda new to all of this. I have the plugin successfuly installed and working just like I want it except I would like to see an excerpt of the recent post that it pulls. When I get the excerpt to show I would like to link the excerpt to the categorie instead of just going to the post. Is this possible? Can anyone help me? This is the code I am using…




  • 6. Mark Tyhurst  |  February 15th, 2008 at 4:13 pm

    maybe this will work…

    <?php if (function_exists('recent_posts')) { ?>
    		<?php recent_posts('included_cats=10'); ?>
    	<?php } ?>
    <?php if (function_exists('recent_posts')) { ?>
    		<?php recent_posts('included_cats=8'); ?>
    	<?php } ?>
    <?php if (function_exists('recent_posts')) { ?>
    		<?php recent_posts('included_cats=11'); ?>
    	<?php } ?>

  • 7. Rob  |  February 15th, 2008 at 6:18 pm

    Mark Tyhurst: Maybe you want to start with an output template like:


  • 8. Mark Tyhurst  |  February 15th, 2008 at 7:03 pm

    I am sorry I am not sure where to put the code that you specified above. Any advice where I should put it? Thanks so much!!!

  • 9. Rob  |  February 15th, 2008 at 9:53 pm

    Mark: Look on the Options page in the WordPress Admin section. There is a place to enter the plugin output template.

  • 10. Kinda  |  February 15th, 2008 at 11:28 pm


    I don’t understand the difference between “excerpt” and snippet 😕

    I find your plugin very good, but is it possible that the snippet/extract show the part of the post that “match” with the “post title words”, or with the word that are the most related.

    For exemple in google the snippet show you the most related part of the page in relation with your search. It would be great to make the same with this plugin :-) !!

  • 11. Rob  |  February 16th, 2008 at 9:12 am

    Kinda: The basic difference is that the snippet strips out anything but plain text but the excerpt tries to behave like the WordPress excerpt.

    Your suggestion is an interesting one. I think it would be possible to implement but not easy. I’ll bear it in mind. Thanks.

  • 12. Kinda  |  February 16th, 2008 at 9:59 am

    Thank you for the difference :).

    Your plugin is very good. With “targeted snippets” it woud be GREAT 😉 !

    Perhaps taking the 2 most important words and targeted them 😕 (you also could give us the possibility to transform the words targeted this : like strong word strong, but this is just to improve after, after,… 😉

    Have a nice we :) ! And thank you again for your plugin !!

  • 13. Mark  |  February 16th, 2008 at 12:25 pm

    Thanks Rob! I absolutely love this plugin!!! I got most of it to work except that when you click on the excerpt it just goes to the post instead of to the category.


    Where {URL} is I tried putting {catlinks} and that did not work either… I also tried putting the {catlinks} after the {excerpt} and that didn’t work either. Is this wrong? I can’t figure it out… :-( This is where I am trying to do this under the TV, Movies, Remembering at the bottom of the page.

  • 14. Mark  |  February 16th, 2008 at 12:25 pm

    {link}<a href="{url}">{excerpt}...</a>

  • 15. Rob  |  February 16th, 2008 at 3:45 pm

    Mark: There is a way but it is going to be messier than I’d like.

    You need a different output template for each category but that’s OK since you are already calling recent_posts three times, i.e.:

    {link}<a href="">{excerpt}...</a>

    You have to pass the output template as a parameter along with the



    recent_posts(\'included_cats=8&output_template={link}<a href=\"\">{excerpt}...</a>\');

    (note the ‘&’ … and please ignore the four extra slashes!)
    Give that a try! It would have been a little easier if you were using pretty permalinks I think.

  • 16. Mark  |  February 16th, 2008 at 11:15 pm

    Thank you so much for your help!!!!!! It works great!

  • 17. Yedidia  |  February 18th, 2008 at 9:11 pm

    I upgraded to WP 2.3.3 and so I had to upgrade the “recent posts” plugin
    but the recent post displayed are not recent at all…

    also… any chance my img in the wordpress excerpt could show as a result of “recent post” and no text at all?

  • 18. Rob  |  February 19th, 2008 at 1:13 am

    Yedidia: Can you explain some more what you mean in your first sentence?

    You could perhaps show the image and no text by using some clever CSS…

  • 19. Deuce  |  February 26th, 2008 at 10:50 pm

    Had anyone figured out how to output a custom field (thumb image) with the recent posts plugin? I just need thumb images to show with my recent posts.

    Maybe someone has covered it, but I can’t seem to find it on here.
    Thanks! Very Awesome Plugin.

  • 20. Rob  |  February 27th, 2008 at 9:48 am

    Deuce: You can output the text contained in a custom field using the output template tag {custom:name_of_field}. If you had a field called ‘thumb’ containing the url of the thumbnail image you would try something like:

    <img src="{custom:thumb}" />

    I hope that helps.

  • 21. robin  |  February 29th, 2008 at 2:17 pm

    This is an excellent plugin and I love the admin interface.

    But I’m finding that no matter how I tweak the settings, I get a lot of “None Found.”

    In the absence of going back and making a lot of changes to old content, I think what I really need is a way to match based on tags and categories excluding title and content. Is there a way to tweak the plugin to exclude this or should I be looking at another plugin?

    Sorry if I sound like I’m proposing to uglify such a beautiful thing.

  • 22. Rob  |  February 29th, 2008 at 6:09 pm

    robin: Thanks for the positive comments. I am surprised you are getting a lot of ‘not found’ — I virtually never get them unless I constrain the other parameters too tightly. I wonder if there’s a bug or configuration issue?

    The next version has the option to judge similarity by any combination of content, title, or tag and should be out ‘soon’.

  • 23. S  |  March 1st, 2008 at 2:15 am

    Hmmm… I am having the same problem as Yedidia. I just upraded my blog to WP 2.3.3 and now the recent posts seem to be from a couple years ago.

    I am using this code to display:

    <?php recent_posts('limit=10&included_cats=3&output_template=<b>• {link}</b><br>'); ?>

  • 24. Rob  |  March 1st, 2008 at 9:51 am

    S: Thanks for the report. Can you let me know the versions of PHP and MySQL you are using?

  • 25. S  |  March 1st, 2008 at 10:05 am

    Thanks for your quick feedback: MySQL 4.1.21 and PHP 4.4.4.

    Here are the full server details: Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7a mod_perl/1.29


  • 26. Rob  |  March 1st, 2008 at 10:51 am

    S: I thought this might be the problem. MySQL has a bug in version 4.1.21. I have documented it and suggested a workaround on the Recent Posts page under ‘Usage’. If you can convince your host to upgrade MySQL it would be a better solution. Good luck! Let me know if you succeed.

  • 27. Rob  |  March 1st, 2008 at 2:19 pm

    S: I’ve just been reconsidering the workaround mentioned above. If, as in your case, you are using WordPress version 2.3 or higher you can simply drop the ‘DISTINCT’ in the SQL query. Get back to me if you need more guidance on how to do that.

  • 28. S  |  March 1st, 2008 at 3:48 pm

    Hi, thanks for your comment. I would like to try your second idea of removing ‘DISTINCT’. I’m not sure what to do though. I found this line of code and commented it out, but it seems not to work correctly:

    $sql = "SELECT DISTINCT " . $needed_fields. " FROM $wpdb->posts ";

    Pls let me know exactly what I should delete.

  • 29. Rob  |  March 1st, 2008 at 5:20 pm

    S: You have found the right line! All you need to do is remove the word ‘DISTINCT’, i.e.

     $sql = "SELECT " . $needed_fields. " FROM $wpdb->posts ";

    Please let me know if it turns out OK.

  • 30. S  |  March 1st, 2008 at 8:04 pm

    Yup!! it works very well :) Thank you!

    One more question: after I have my mysql upgraded, is it ok to still have “DISTINCT” removed or is it best to add it back? Does the removal place additional stress/strain onm the server for caching?

  • 31. Rob  |  March 1st, 2008 at 8:26 pm

    S: I’m glad it works … you can forget about DISTINCT for good. I realised that it wasn’t needed in the code for WP 2.3+ and have removed it from the next version. I just had to make sure there was a workaround in place for earlier versions of WP.

    (There is no effect on caching. If anything the server has to do less work as the query is simpler.)

  • 32. craig  |  March 4th, 2008 at 3:13 pm


    I’m interesting in pulling up the IP address of the commenter, so that I can display their country flag next to their name.

    Ideas on how I might be able to do that?

  • 33. craig  |  March 4th, 2008 at 3:47 pm

    Ahhh — nevermind Rob, I’ve got it.

    'flag' => array('comment_author_IP'),

    case 'flag':         
    $value = '<img alt="" src="/flags/flag_' . wp_ozh_getCountryCode(0,$result->comment_author_IP) . '.gif"/>';

  • 34. Rob  |  March 4th, 2008 at 3:57 pm

    craig: I’m glad you worked it out! I’ll incorporate the tag in the next version. Thanks.

  • 35. Shanx  |  March 12th, 2008 at 2:23 am

    Hi. I am using the Recent Posts plugin, and would like to list the posts in alphabetical order, not by date.


    1. Is there any option to overwrite this default date ordering? (I know “Recent” means recent, but I like your plugin and want to use it to list other stuff too).

    2. Is there any trick to show the listing in two columns instead of one? I can do this with two float:left spans, and call the Recent Posts with two template tags (i.e., twice), but don’t quite know how to make sure that the titles that are displayed in the first call are NOT repeated in the second.


  • 36. Rob  |  March 12th, 2008 at 9:41 am


    1. Do you mean to select the (say) 10 most recent posts and then display them in alphabetic order? If so there’s no way to do that … but people keep asking for a similar behaviour so I might look into it.

    2. You may be looking for the skip setting. You could then list the first 5 with skip = 0 and the next 5 with skip = 5.

  • 37. AJ  |  March 17th, 2008 at 4:47 pm

    Hi, I keep getting this error in my dashboard using Similar Posts:
    Warning: Missing argument 1 for admin_subpages() in /home/slash/public_html/wp-content/plugins/post-plugin-library/admin-subpages.php on line 17

    And this on my posts:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘t worth it__’ ))) + (2.44285714286 * (MATCH (`content`) AGAINST ( ” managed pray’ at line 1]
    SELECT *, ((0.36 * (MATCH (`title`) AGAINST ( ‘cockroach hunting isn’t worth it__’ ))) + (2.44285714286 * (MATCH (`content`) AGAINST ( ” managed prayer cockroach food level rune trip mith takes time money skilling higher-medium levels nope lower worth cosmic minutes make” ))) ) as score FROM `blog_similar_posts` LEFT JOIN `blog_posts` ON `pID` = `ID` WHERE (MATCH (`title`) AGAINST ( ‘cockroach hunting isn’t worth it__’ ) OR MATCH (`content`) AGAINST ( ” managed prayer cockroach food level rune trip mith takes time money skilling higher-medium levels nope lower worth cosmic minutes make” )) AND post_status != ‘future’ AND post_status=’publish’ AND post_type=’post’ AND ID != 34 AND post_password =” ORDER BY score DESC LIMIT 0, 5
    None Found

    I’m using WordPress 2.3.3 and Similar Posts plugin 2.5b1

  • 38. Rob  |  March 17th, 2008 at 5:50 pm

    AJ: Try v 2.5 b2 which I have just uploaded. Thanks for the bug report. It should fix the second problem. I am working on the first.

  • 39. Rob  |  March 17th, 2008 at 6:23 pm

    Version 2.5 b3 posted — fixes the admin options pages mess (I hope — feedback would be good!)

  • 40. CWF Game Cast  |  March 24th, 2008 at 5:23 am

    I have encountered an error with this plugin and WP 2.5 RC1. I am using 2.5 b5 of this plugin, updated via the automatic updater in WP 2.5 RC1.

    The error message I receive is

    atal error: Class 'admin_subpages' not found in /home/wargamin/public_html/wp-content/plugins/similar-posts/similar-posts-admin.php on line 44

    How do I rectify that? My blog is located at

  • 41. CWF Game Cast  |  March 24th, 2008 at 5:34 am

    I must apologize for the double post. The reason for this 2nd post is that I fixed the problem. 2.5 b5 of this plugin doesn’t work with WP 2.5 RC1, at least not for me.

    So, I reverted to 2.5 b4 downloaded directly from this site. I then uploaded both the plugin and the library folders into my plugins folder and that did the trick.

    Don’t know how WP got 2.5 b5 of this plugin from automatic install but it may be worth looking into. Once again sorry for the double post.

  • 42. Rob  |  March 24th, 2008 at 8:55 am

    CWF: My apologies! I am having trouble with the automatic download function. You would need to go to the download site and also download the Post-Plugin Library as well as the Similar Posts plugin. In fact if you could try that for me I would be very grateful.

  • 43. Tanguillo  |  March 24th, 2008 at 5:25 pm

    Rob, I have a problem. I just download the version of the plugin, installed (I delete the older one first) and it shows me the message: “Please install the Post Plugin Library”. I don’t delete that library, is still in the root of plugins.
    I try do deactivate, and activate the plugin, show no errors, but the message is still there.
    Where should I look up?

  • 44. Rob  |  March 24th, 2008 at 5:37 pm

    Tanguillo: Can you follow these links to download the latest versions of both Similar Posts and the Post Plugin Library and then let me know how things stand and we can work out from there what the problem is.

  • 45. CWF Game Cast  |  March 24th, 2008 at 7:13 pm

    Which version is the most current of Similar Posts? Is it 2.5 b5 or 2.5 b4? This site says 2.5 b4 is the most current. But, my dashboard of my WP blog says 2.5 b5 is the most current.

  • 46. CWF Game Cast  |  March 24th, 2008 at 7:14 pm

    Which version is the most current of Similar Posts? Is it 2.5 b7 or 2.5 b4? This site says 2.5 b4 is the most current. But, my dashboard of my WP blog says 2.5 b7 is the most current.

  • 47. Stefan  |  March 24th, 2008 at 8:52 pm

    2.5b5 didn’t work on my WP 2.3.3 so I switched back to 2.5b4.

  • 48. Rob  |  March 24th, 2008 at 9:12 pm

    CWF: The versions on this site are packaged differently — use them if you wish — but the versions on the wordpress directory site are newer and (hopefully) will be the ones that will be developed. There is very little difference in functionality as yet. I am having some difficulty with the directory site though — check out my recent blog posts.

  • 49. Rob  |  March 24th, 2008 at 9:14 pm

    Stefan: How did 2.5 b5 not work for you? Check out my recent blog posts for some information that might be helpful.

  • 50. Stefan  |  March 24th, 2008 at 9:33 pm

    Hi Rob, I’ve got some kind of php error: “line 44 in blabla php” with 2.5b5 but I’ll check out the latest version. By the way: Do you have 2 posts each with about 300 coments for the same plugin? A little confusing. :-)

  • 51. CWF Game Cast  |  March 24th, 2008 at 9:51 pm

    Rob: Thanks for your help. That is rather confusing to have the versions packaged differently. Maybe you’ll be able to keep them in sync between here and the WP site in the future?

    I installed 2.5 b7 from the WP site and all works perfectly. I did it the old manual way but am hoping the automatic updater will work with your plugin soon. I bet a lot of people will use that method when WP 2.5 final is released.

    I really appreciate all your help. Many thanks!

  • 52. Stefan  |  March 24th, 2008 at 9:58 pm

    I had to switch Similar Posts 2.5 b7 on and off twice because after first activation SP told me that Post Plugin Library was not installed (but it was, new version). Now it works. Thanks again for your great plugin!

  • 53. Rob  |  March 24th, 2008 at 10:57 pm

    Yes, I’m hoping that the official directory will work out well in the long term. Right now it’s a nightmare because it’s not showing the installation instructions correctly and not properly reporting version numbers for the automatic update. I presume I’ve done something stupid along the way but I really don’t know what it is and so far I have had no response from the site administrator. But here’s hoping …

  • 54. Joe  |  March 25th, 2008 at 12:41 am

    I can’t get {php:code} to work

    I put in: {php:sr_getsingle(‘2’);} to the template

    And all I get in the output is:

    {php:sr_getsingle(‘2’);} (literal)

    Second question, could I do this?



  • 55. Rob  |  March 25th, 2008 at 8:20 am

    Joe: First, let me check if you are running version 2.5 of the plugin. Also, if you are, it would help if you made a bug report through the plugin’s admin page because it would tell me a lot about your selected options etc.

    Does {php:echo 'hello';} work?

  • 56. Joe  |  March 25th, 2008 at 1:23 pm

    Alright cool I got 2.5 and it works, but I need to pass the ID of the post being displayed to my function, if i use “get_the_id()” it just uses the ID of the main post (the one that’s in the “loop” above the recent_posts() function)

    How can I pass the ID of the post being called to display?

    I tried this:


    but the first “}” closes it and so it ends up just outputting “);}”

    Don’t worry about sr_getsingle() that function works… just help me pass the ID to it :)

  • 57. Rob  |  March 25th, 2008 at 1:31 pm

    Joe: The {php} tag ‘knows’ the $result object which contains the values of all the fields from wp_posts so you should be able to use $result->ID, i.e.,

    Good luck!

  • 58. Joe  |  March 25th, 2008 at 1:48 pm

    Well I want this to be a CSS class

    So I’m doing it like this:

    where xx = whatever i need to do to pass the ID

    Can I open code tags up in there? I don’t think I can….?

  • 59. Rob  |  March 25th, 2008 at 1:58 pm

    Joe: Sorry, you lost me there…

  • 60. Joe  |  March 25th, 2008 at 2:01 pm

    Oh sorry, the HTML code got knocked out

    <span class="rating r{php:sr_getsingle(xx);}"></span>

    So the function sr_getsingle(postid) returns a number that I use in my CSS to change how something looks.

  • 61. Rob  |  March 25th, 2008 at 2:08 pm

    Joe: The use of $result->ID should still work

  • 62. Sue  |  March 28th, 2008 at 12:41 am

    Hi Rob!
    I have installed the similar posts plug in and am hoping there is a way to present the similar posts on a line rahter than a vertical list, such as

    Similar Posts: and the following centered:
    [Post 1 ~ Post 2 ~ Post 3
    Post 4 ~ Post 5]

    Is there a way to accomplish that?
    Many thanks,

  • 63. joe  |  March 28th, 2008 at 2:43 am

    hell yea dude your advice worked for me props, mothaf**ka

  • 64. Rob  |  March 28th, 2008 at 10:02 am

    Sue: Try this…

    Set output template to: ‘ ~ {link}’
    Set text before to ‘[‘
    Set text after to ‘]’
    Set text to trim at start to ‘ ~ ‘

    That should give you the output you want but you might have to play with your templates CSS styles to

    a) get it centred
    b) ensure the links display inline

    Good luck!

  • 65. Sue  |  March 29th, 2008 at 3:27 am

    Thank you Rob. Indeed, I think the css coding may be the tricky part. I will give it a while.
    many thanks,

  • 66. vladimir  |  March 29th, 2008 at 8:02 pm

    One of the best plugins around, hats down.


  • 67. Bierflesje  |  March 30th, 2008 at 6:49 pm

    Hi, thanx for the plugin.

    After upgrading to WP2.5 and your latest plugins the similartherms custom field isn’t there anymore.
    Although similarterms is working, i cant create or edit the terms.
    How can i get it back?

  • 68. Rob  |  March 30th, 2008 at 9:20 pm

    Bierflesje: I’m afraid they are gone! Version 2.5 uses its own table rather than indexing wp_posts. I think the need for extra keywords has diminished with the new facility to match by tags.

    If you want to remove the plugin (use the option from the Similar Posts settings page to remove the table too) you can downgrade to an earlier version.

  • 69. Ivars  |  March 31st, 2008 at 7:41 pm

    If we have for example 20 most frequent words of post content, why not to use it to upgrade post tags list like as in Headspace?

  • 70. Rob  |  March 31st, 2008 at 9:39 pm

    Ivars: Are you thinking of META keywords? It would certainly be possible to do that kind of thing.

    A project I’ve been more interested in has been automatic tagging of blog posts or, at least, tag suggestion. There’s an enormous and growing literature on the subject and I have a few algortihms in reserve to apply to Similar Posts but I have realised that while extracting key words is a good basis for comparing similarity it doesn’t do a very good job of tagging because tags, to be most useful, have to add information and extracted keywords can never escape from the universe of the actual text. There are a number of approaches I’m playing with but they tend to be handicapped by PHP’s lack of mathematical libraries. Python is dripping with them but PHP not so much.

    Sorry to go off topic. Are you suggesting the addition to Similar Posts of the option to add META tags to the head?

  • 71. Michael Lee  |  April 1st, 2008 at 4:20 pm

    Thank you again for building this – it is immensely useful to me.

    The “Random Posts” plugin is throwing an error in my apache logs. The error is as follows:

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND post_password ='' ORDER BY RAND() LIMIT 0, 3' at line 1 for query SELECT * FROM wp_posts WHERE post_status != 'future' AND post_status='publish' AND post_type='post' AND ID != AND post_password ='' ORDER BY RAND() LIMIT 0, 3 made by execute

    It’s non-fatal, the plugin works fine, but I think the error is caused by an extra space in line 88 of random-posts.php:

    $sql .= " ORDER BY RAND() LIMIT $limit";

  • 72. Michael Lee  |  April 1st, 2008 at 4:25 pm

    nope, guess not. Took the space out, still getting the error.

  • 73. Rob  |  April 1st, 2008 at 6:18 pm

    Michael Lee: The problem is that you are asking it to exclude the current post from the random listing but for some reason the plugin can’t ascertain what the current post is. I have changed the code so the plugin doesn’t explode if it encounters this condition. I’ll post the update soon but in the meantime just try unsetting the option to omit the current post.

  • 74. GMATPrep  |  April 2nd, 2008 at 4:42 am

    Just upgraded to latest version to support WP2.5. I get “None Found” string instead of similar posts.

    Please guide

  • 75. GMATPrep  |  April 2nd, 2008 at 5:09 am

    We get this error while activating the plugin

    Fatal error: Cannot redeclare similar_posts() (previously declared in //public_html/xxx/blog/wp-content/plugins/similar-posts/similar-posts.php:33) in /home2/scorech/public_html/xxxt/blog/wp-content/plugins/similar-posts/similar-posts.php on line 33

  • 76. Rob  |  April 2nd, 2008 at 9:33 am

    GMATPrep: This is a problem I am still trying to understand. If you have access to the Similar Posts settings screens please submit a bug report to help me track down a proper solution. In the meantime the FAQ on the Similar Posts page should be helpful.

  • 77. camu  |  April 2nd, 2008 at 4:35 pm

    Hi there, thank you for this great piece of code. I upgraded to latest version. Maybe I have too many articles (700?) for this plugin to complete the reindexing. After a couple of seconds I just get a blank page. If I check the database, wp_similar_posts is there, but it contains around 200 rows. I think it is a problem related to some limit in PHP execution times, set by my provider. Is there a way to reindex my articles directlty through a mysql query? Moreover, I see that also similar_terms custom field, is not defined for all my articles anymore. Thanks, camu.

  • 78. Rob  |  April 2nd, 2008 at 6:06 pm

    camu: Let me start with the last point. The plugin now uses its own database table rather than using custom fields. It allows more flexibility and was needed to make tag searching possible. If you edited the custom field to sharpen up the matching you should be able to do a similar thing with the WordPress post tagging system.

    700 articles doesn’t seem that much different than my own blog so I’m surprised that re-indexing isn’t working. Using the extended character option and/or using stemming does make quite a difference to the time taken though. There isn’t a simple SQL query to do the job. Try using the PHP code ini_get(max_execution_time); to see what the current time limit is. The default is 30s. I doubt your host will have restricted the execution time to just a few seconds.

    It is more likely that you have uncovered a bug which is causing the indexing to silently abort. I hope you’ll be able to help me track it down. It would be helpful if you could send me a bug report from the settings page as it lets me know version information etc. It would also be useful to know whether you are running in safe mode.

  • 79. camu  |  April 2nd, 2008 at 6:45 pm

    Thanks Rob, I’ve just filed a bug ticket, but I don’t know if you received it, since I keep getting this error message:

    Warning: Invalid argument supplied for foreach() in /websites/LinuxPackage04/rm/ar/sh/ on line 112

    Sure I can help you fixing the bug, if any! Maybe there is a conflict with some of my plugins?

  • 80. jcwinnie  |  April 2nd, 2008 at 11:10 pm

    Was working fine until most recent automatic upgrade. Now Similar Post Feeds provides a list but Similar Post shows “None Found”.

    My guess is that I need to re-index something.

  • 81. Rob  |  April 2nd, 2008 at 11:38 pm

    jcwinnie: If you have access to the Similar Posts settings screens please submit a bug report to help me track down a proper solution. In the meantime the FAQ on the Similar Posts page should be helpful.


  • 82. online business blogger  |  April 3rd, 2008 at 2:15 pm

    These plugins are briliant, you have certainnly spent a lot of time and giving a lot of thought into each and every one of them, excellent.

    There is one question I have, I’m using the similar post plugin and to pull posts from several categories. This is great for human visitor but not so good for silo structures.

    What is required is the ‘nofollow” tag after the URL’s (i.e. post titles) so that the SE spiders do not follow the links and mess up the silo structure.

    I guess I could restrict the categories on a post-by-post basis, but I think an option to enable/disable “nofollow” would be ideal.

  • 83. Rob  |  April 3rd, 2008 at 5:40 pm

    online business blogger: All you have to do is construct the output template you want rather than using the shorthand {link}, e.g.:

    <a href="{url}" rel="nofollow">{title}</a>

    Does that help?

  • 84. online business blogger  |  April 4th, 2008 at 1:52 am

    cool! that did the trick.
    now I’ll go and play withe the randon post plugin

  • 85. Уолтер Мондейл  |  April 6th, 2008 at 3:29 am


  • 86. Erick  |  April 6th, 2008 at 5:28 am

    Please clearly indicate which template tags such as {link} are possible. Where is the link where all of these options are listed?

  • 87. Rob  |  April 6th, 2008 at 10:29 am

    Erick: The output template tags are all listed on this page above.

  • 88. Chris Masse  |  April 8th, 2008 at 5:00 pm

    Thanks for this great plugin. FYI, there is an incompatibility between “Similar Posts” and “Admin Drop Down Menu”. The sub-menu of “Similar Posts” does not appear.
    Thanks for listening.
    Chris Masse

  • 89. Rob  |  April 8th, 2008 at 6:18 pm

    Chris Masse: Thanks for the kind words and for letting me know about the incompatibility. Do you mean the plugin by Ozh? Or the version by Yellow Swordfish? At present I have both (not at the same time!) working alongside Similar Posts with no issues. However, I am having a problem with Lighter Admin Drop Menu from corpodibacco which I am working on.

    Could you send me the details of plugin and versions and which browser you are using?

  • 90. Chris Masse  |  April 8th, 2008 at 9:01 pm

    I meant “Admin Drop Down Menu” by by Ozh. [I do also use “WordPress Admin Bar”, by the way.’

    I was not saying that “Similar Posts” does not work with your plugin. I’m saying that the sub-menu of “Similar Posts” does not appear. Only the first option page in “Settings” appear, not the other ones.
    Chris Masse

  • 91. Rob  |  April 8th, 2008 at 9:15 pm

    Chris Masse: Ozh’s menu doesn’t interfere with the Similar Posts settings submenus on my systems. Can you give me some more information about your own system and browser so that I can try and see if I can duplicate the problem you are having. Thanks.

  • 92. Kevin Goldman  |  April 8th, 2008 at 10:56 pm

    Can this module also add the “current_page_item” class to the item that is currently being viewed? I bet it can. I just can’t find where to set this up.

    Any advice would be greatly appreciated. Thanks,

  • 93. Rob  |  April 8th, 2008 at 11:17 pm

    Kevin Goldman: I’m not sure what would constitute the ‘item being currently viewed’ in the context of the output from these plugins… I guess it depends which plugin and how you are using it. It sounds like you have a very particular use in mind. If you fill me in a bit I might be able to see what you are hoping for. Some kind of menu?

  • 94. Kevin Goldman  |  April 8th, 2008 at 11:31 pm

    Hi Rob, thanks for the incredibly quick reply. Let me try to explain. WordPress will add the “current_page_item” class to menu items if the menu item matches the page you are viewing.

    For example: if I’m on the Contact Us page here: then the “Contact Us” main menu item is white since it’s tag has the “current_page_item” class applied to it. In my CSS I make the “current_page_item” background white.

    Another example, I’m using NAVT Lists for the side menu of my site. If you view this page you’ll see that the side menu for Tai Chi is also highlighted because it’s tag uses the “current_page_item”.

    So.. : ) I’d love to find a way that the recent posts menu items will behave the same way. For example, if I’m on this page I’d like the that shows the “Phoenix Arizona He…” menu item to have the “current_page_item” class assigned to it.

    I really hope this makes sense. And again, thanks for the quick feedback. BTW – do you accept donations? I’d be more than happy to send one view paypal, etc.

  • 95. Rob  |  April 9th, 2008 at 7:47 am

    Kevin: That all makes perfect sense … I just hadn’t thought of anyone using the plugin in this way. Most people use it to list recent posts rather than pages. It should be relatively easy for me to mark the current list item in some way. I’m looking into it.

    Since you ask there’s a donations link on the plugin site where Recent Posts is hosted.

  • 96. Rob  |  April 9th, 2008 at 3:38 pm

    Kevin: After a little reflection I realise you can do what you want with the {php} output template tag.

    {php:if ($result->ID === $post->ID) echo " class=\"current-item\"";}

    This will apply a class when the current post ID matches the ID of the item in the list.

    At present there is the option to include or exclude pages but you always get posts. Would it be useful to have the option to only show pages and not posts?

  • 97. Kevin Goldman  |  April 9th, 2008 at 4:06 pm

    HI Rob, thanks so much. I thought it would be possible with the {php} tag. But, I may have something wrong in my output template since this doesn’t seem to execute the PHP code.

    This is what I have in my output template:

    <li {php:if ($result->ID === $post->ID) echo "class=\"current-item\"";}>{link:maxlength:trim}</li>

    The result here shows the code not the output.

    Sorry in advance for all the questions : | I might as well stick with it here since it looks like this is very close to a resolution. Thanks again.

  • 98. Kevin Goldman  |  April 9th, 2008 at 4:53 pm

    Hi Rob, I had to remove incorrect output at the link above for the time being. But I uploaded this screen grab so you can see what the problematic output was:

  • 99. Rob  |  April 9th, 2008 at 5:53 pm

    Kevin: Grab the latest version … 2.5b16. I found a small error with ‘->’ in {php}.

    Any response about the page only option?

  • 100. thiefhunter  |  April 9th, 2008 at 10:07 pm

    Excellent plugin, thank you. Works perfectly, and I learned so much just reading your customization page.

  • 101. Shiv  |  April 12th, 2008 at 9:38 am

    Hi there!
    Firstly thanks for the great plugin, it’s perfect for my needs :) :)
    Unfortunately since I upgraded to the latest version it stopped working :( The widget works fine but I don’t use that, what I use is the special tag in a post to show the recent posts list on my front page, however since upgrading te special tag doesn’t seem to be getting replaced anymore :( (If you view-source on the page you can still see the tag in the HTML just after the front page post)

    Any ideas what it could be? I’ve tried deactivating and reactivating but that hasn’t helped, I’ve also checked that “Replace special tags in content” in the options is set to “yes”.

    Any help would be much appreciated!!

  • 102. Rob  |  April 12th, 2008 at 10:31 am

    Shiv: You are right. The Similar Posts tag was being replaced but not the one for Recent Posts. I have fixed the problem and will be uploading a new beta version shortly.

  • 103. Christian Otto  |  April 12th, 2008 at 12:04 pm

    Hi Rob,
    I really like your plugin. Even though it´s quite powerful, I could handle it pretty well even as a novice in all things HTML. But I still have one problem with the gravatar tag and I hope you can help. I use it the tag with these parameters:


    But when the commenter has no gravatar, not my own default image is shown but a default provided by Did I make a mistake?

    Christian Otto

  • 104. Rob  |  April 12th, 2008 at 2:27 pm

    Christian Otto: Can I convince you it was a deliberate mistake? … I thought not!

    I had a couple of stray characters messing things up. I will post an update (2.5b19) of the Post-Plugin Library in a few minutes.

  • 105. [/root.]  |  April 12th, 2008 at 2:49 pm

    Thanks for the plugin. I have one question. I’m trying to display the similar post but the first one should have li class=”first” parameter.


    How can I implement this code into plugin?

  • 106. Christian Otto  |  April 12th, 2008 at 3:07 pm

    Hi Rob,
    I instantly upgraded both the Post-Plugin Library and Recent Comments to version 2.5b19 but still the wrong default images are shown. Maybe it´s something else? *scratches head*

  • 107. Rob  |  April 12th, 2008 at 4:30 pm

    [/root]: I think you can do what you want with the {php} output template tag.

    If your template was:


    make it into:

    <li{php:global $xwq;if (!$x) echo " class=\"first\"";$xwq=1;}>{link}</li>

    It checks if a variable ($xwq should be unlikely enough) has been given a value and if not adds the class. It then gives the variable a value so that the subsequent items in the list don’t get the class.

    Give it a try.

  • 108. Rob  |  April 12th, 2008 at 4:41 pm

    Christian Otto: I’ve uploaded version 2.5b20 of the Post-Plugin Library which (I hope) fixes the problem.

  • 109. schreibstift  |  April 13th, 2008 at 10:37 am

    Thanks for the great Plugin!

    It is possible to omit author comments.

    But how can I exclude comments of all wordpress users? I only want to show guest comments.

  • 110. Thomas  |  April 13th, 2008 at 11:11 am


    thanks for this fantastic plugin. I got one question.

    How would I pass parameters so that only pages are displayed and no posts.

    Thanks Thomas

  • 111. Rob  |  April 13th, 2008 at 11:30 am

    schreibstift: You can’t do that at present. I’m not sure what you mean … do you mean the exact opposite of ‘omit author comments’? If so it would be easy for me to implement.

  • 112. Rob  |  April 13th, 2008 at 11:31 am

    Thomas: You can’t at present but I have been considering it. You would find it useful?

  • 113. Thomas  |  April 13th, 2008 at 11:32 am

    Yeahh def. Right now I need to use another plugin (Fuzzy Updates) to just do this.

    Would be great to stay with just one plugin.


  • 114. schreibstift  |  April 13th, 2008 at 3:59 pm

    @Rob: No, not the opposite.

    I only want to show guest comments.

    no show:
    – if i’am the author
    – if i post a comment on another authors post

  • 115. Sue  |  April 15th, 2008 at 5:43 pm

    Hi Rob,
    for similar posts, I have made this my output template:

    however, the thumbnails for the images are not appearing.

    I have also tried it without the px and placing a space between the number and the px all to no avail.

    What am I doing wrong?
    Many thanks,

  • 116. Michelle  |  April 18th, 2008 at 8:54 pm

    I’ve installed Recent Comments in WP 2.5 and the {commenterlink} tag seems to output nothing. Perhaps I’m using it wrong?

    My code:
    {commenterlink}: {commentexcerpt:10}...

    Output on blog:
    : blah blah blah blah blah blah blah blah blah blah…

    Would appreciate your help, and thanks for the plugin. :)

  • 117. nomad4ever  |  April 18th, 2008 at 10:10 pm

    Hi Rob,

    I’m using your great plugins for quite some months now. Somehow the Similar Posts stopped working after upgrading to the latest (from 1.6x??) version via Automatic Updating the Plugin Screen of WordPress 2.5. It simply show “non found” all the time. Fiddling with the options doesn’t help either. I tried deactivating/activating, but to no avail. Unfortunately I’m no techie and don’t know where to check if the SQL table is set and correct. Could you please help me out, what else I could try?

    Many thanks,


  • 118. Rob  |  April 19th, 2008 at 9:52 am

    Michelle: You are dead right! I have fixed it and will post an update today if I get chance. In the meantime if you wish to edit the plugin files it is a very small change.

    Open up /post-plugin-library/output_tags.php and around line 220 you will find the function ‘otf_commenterlink’.

    The last line is missing! The function should look like this:

    function otf_commenterlink($option_key, $result, $ext) {
    	$url = otf_commenterurl($option_key, $result, '');
    	$author = otf_commenter($option_key, $result, '');
    	$author = oth_truncate_text($author, $ext);
    	if (empty($url) || $url == 'http://') $value = $author;
    	else $value = "<a href='$url' rel='external nofollow'>$author</a>";
    	return $value;

    Just add in that last line and the tag should return to life.

  • 119. Lee  |  April 19th, 2008 at 3:11 pm

    Hi Rob
    I’m using the RecentPost plugin and I want to show static pages but not posts. My pages are structured in a hierarchical fashion, i.e.
    — child
    —- grandchild

    I want to show the 10 most recent grandchild pages but I just can’t seem to get it to work, can it be done with static pages


  • 120. Rob  |  April 19th, 2008 at 4:14 pm

    Lee: The latest version of the plugin does let you hide posts and only show pages but selecting just the grandchildren pages sounds hard to do–unless of course they were categorised that way. But you can’t categorise or tag pages can you…

    I’m wondering how I could add what you need to the plugin easily? Checking for a particular grandparent is rather too specific to be useful to any case but this one. Maybe using custom fields somehow? What do you think?

  • 121. online business blogger  |  April 19th, 2008 at 4:25 pm

    I see what you mean, the custom field idea sounds interesting, I will play around with that and see how I get on, any help would be appreciated


  • 122. Lee  |  April 19th, 2008 at 6:52 pm

    No just not getting it.
    using a page I created a custom key called it “pagegroup” with a value of “podcast”
    I then tried the following {link}{custom:pagegroup} in the recent_posts output tab. The results is the same as using recent_posts().

    I also tried recent_posts(‘limit=10&output_template={custom:pagegroup}’) in my template but did not get any rows returned. what am I doing wrong?


  • 123. Rob  |  April 19th, 2008 at 9:17 pm

    Lee: You are not doing anything wrong. As I said above, the plugin as it stands can’t do what you want. I was wondering how to extend the plugin so that it might but it isn’t straightforward. The query of the posts database only has it’s contents to go on. There is a ‘parent’ field which might be useful. I was ‘thinking out loud’ about involving custom fields in the query. It could be very powerful but it would also add an overhead for all queries that I need to measure.

    So there is no immediate solution with this plugin.

  • 124. Terry Walsh  |  April 20th, 2008 at 1:32 am


    I’m getting a formatting/display error when using Similar Posts with a table – see – this is a WP issue, I believe.

    But: can I switch Similar Posts to only show on posts, and not to be displayed on static pages?


  • 125. Michelle  |  April 20th, 2008 at 7:14 am

    Hi Rob, thanks for the quick response and code fix on the plugin! Much appreciated. :)

  • 126. Rob  |  April 20th, 2008 at 9:41 am

    Terry Walsh: The answer is ‘yes’ but to go further depends on how you are getting Similar Posts to show in the first place. If you are using it as a widget you can use the ‘condition’ setting and one of WP’s conditional tags like !is_page(). If you are inserting similar_posts() into your theme files then it depends on your theme. Sorry I can’t be more specific?

  • 127. Martin  |  April 20th, 2008 at 7:55 pm

    Hi Rob

    Thanks for the help . Is it possible to do something like this to override the Output template , directly on the WP page. So basically I want to show a recent post from cat 5 and show a snippet of the txt , possible ?

    <?php recent_posts('included_cats=5&limit=1&snippet=30&output_template=<li>{link}</li>');?>

  • 128. Martin  |  April 20th, 2008 at 7:58 pm

    Oops sorry , my bad. Figured it out . I can include {snippet} in the output_template in the link ….

    Sorry !! :)

  • 129. andras  |  April 21st, 2008 at 6:26 pm

    I am using several wordpress blogs and i want to set up a page which links all of them. on this page I want to show which blog has recent posts. any suggestions on how to go about this?

  • 130. Rob  |  April 21st, 2008 at 6:35 pm

    andras: That is beyond the scope of these plugins but may not be too hard to do if you are familiar with PHP. You would have to query each blog’s posts table in turn and output the results to your page. The hardest part would be knowing the connection details for each table since you wouldn’t have WordPress to help you.

  • 131. andras  |  April 21st, 2008 at 6:40 pm

    hey rob, thanks for the feedback. Couldn’t I copy the querying functionality from the Recent Posts plugin? It must be querying the database as well. Is there some place in the code I could just output the results to my page?

  • 132. Rob  |  April 21st, 2008 at 10:28 pm

    andras: You could certainly adapt the query from Recent Posts but you couldn’t use the actual code because it is connected to the particular blog it is part of.

    I guess an alternative strategy would be to install the plugin on each of your blogs but instead of using recent_posts() which echoes to output you could call RecentPosts::execute() which would return the output as a string. You could write that string to some common file where the common page can access. I guess you could use feeds with a little adaptation.

    I’ll be interested to see what you come up with.

  • 133. Lelia Katherine Thomas  |  April 22nd, 2008 at 2:00 am

    I think I must be doing something stupid here, so I’m hoping someone can point out the problem to me. My class styling is not working for this. Here is my code for Recent Comments:

    <li><a href="{commenturl}" title="Comment on {title}" class="commentname">{commenter}</a>: {commentsnippet}...</li>

    Here is my styling:

    #sidebar .commentername, #sidebar .commentername a {
    	color: #EC6426 !important;
    	text-decoration: none !important;

    As you can see, I’ve even tried to force the coloring and link styling, but I’m still getting your default browser link style, rather than my own. Everything else is working, so it seems like a conflict with the plugin, but maybe I’m missing something.

    Any suggestions? :)

  • 134. Lelia Katherine Thomas  |  April 22nd, 2008 at 2:02 am

    Oh, wow, I was. Maybe it was seeing it on different text, but I notice I called my class something else! Doh! ONE OF THOSE DAYS!

    Thanks for a great plugin, by the way. It’s so detailed!

  • 135. Rob  |  April 23rd, 2008 at 10:56 am

    Lelia Katherine Thomas: Oh, I hate those moments when you suddenly see what you couldn’t see. They always happen in public too!

    Never mind. I’m glad Recent Comments is serving your needs.

  • 136. Pat  |  April 26th, 2008 at 9:58 pm


    i’d like to put the event times from event calender 3 in front of the related links. what would be the best way to do this? it’s this function i need to use, but i don’t know how to reference the page the link is linking to

  • 137. Chris McLaren  |  April 27th, 2008 at 5:43 am

    Hi Rob. Thanks for the great plugins.

    I’m using Recent Comments on my site, where I just recently enabled the new default gravatar stuff (identicons, wavatar, monsters), and I note that I can’t get the {gravatar} tag to use these new defaults.

    It looks like otf_gravatar is always trying to build a real URL from the default param passed in, and if the param is just, say, “identicon” then you get something like “&d=http://identicon” (except urlencoded) in your image URL, rather than “&d=identicon”.

    I’ve hacked something together by changing otf_gravatar for my site, but I thought I’d give you the heads up on this.

    Cheers, and thanks again,


  • 138. Rori  |  April 27th, 2008 at 7:32 am

    Question regarding truncating the author name… is there a way to do that with this plugin? My commenters are going wild with their “author names”

    I mean seriously, look at this…

    # Sydney (in her Tokio Hotel/ Fall Out Boy themed straightjacket with pockets overflowing with Bill gummies!) commented on April 26 – Pic of the Day

    I feel like screaming. :)

  • 139. Rob  |  April 27th, 2008 at 10:33 am

    Pat: You can’t do this without some fiddling around… I had a look at the plugin’s code and had a stab at writing a function to get the schedule by post ID:

    function ec3_get_schedule_byID($ID) {
      global $wpdb;
        "SELECT post_id,start,end,allday,rpt,IF(end>='$ec3->today',1,0) AS active
         FROM $ec3->schedule
         WHERE post_id = $ID
         ORDER BY start"
          foreach($schedule as $s)
      return $ec3_schedule;

    It goes in the main plugin file after ‘ec3_filter_the_posts’. I haven’t tested it!

    If it can be gotten to work you can call it within a {php} output template tag before the {link} tag. It will probably need some tweaking — let me know how you get on.

  • 140. Rob  |  April 27th, 2008 at 10:35 am

    Chris McLaren: I’ll check the code and make a fix in the next beta release. Thank you.

  • 141. Rob  |  April 27th, 2008 at 11:47 am

    Rori: I had to make a few tweaks to one of the plugin files (which I will send to you by email so you won’t have to wait until I can package a new release). Basically, you need to unpack the {commentlink} tag into its building blocks. Try:

    <li><a href="{commenturl}">{commenter:10:trim} commented on {title}</a></li>

    You can of course change ’10’ to whatever length you want and you can try ‘chop’ or ‘snip’ in place of trim.

    If you want to put back the ‘tooltip’, which I left out for clarity, try:
    <li><a href="{commenturl}" rel="bookmark" title="{commentdate} at {commenttime} on {title}">{commenter:10:trim} commented on {title}</a></li>

    Good luck!

  • 142. Pat  |  April 27th, 2008 at 12:05 pm

    Rob: i put the ec3_get_schedule_byID($ID) function into evencalendar3.php and tried to call it in the plugin output settings like this:

    {php: ec3_get_schedule_byID($result->ID);}{link} {tags}

    unfortunately, no schedules are returned:

    a bit down below:
    “Sendungen, die Dich auch interessieren könnten”


  • 143. Rob  |  April 27th, 2008 at 2:22 pm

    Pat: I wouldn’t expect it to. The function I wrote just returns an array of the raw schedule data. I have had another go by plugging the first attempt into ec3_get_schedule. This goes in template-functions.php

    function ec3_get_schedule_byID(
      $format_single =EC3_DEFAULT_FORMAT_SINGLE,
      $format_range  =EC3_DEFAULT_FORMAT_RANGE,
      global $ec3;
        "SELECT post_id,start,end,allday,rpt,IF(end>='$ec3->today',1,0) AS active
         FROM $ec3->schedule
         WHERE post_id = $ID
         ORDER BY start"
          foreach($schedule as $s)
      foreach($ec3_schedule as $s)
        $date_end  =mysql2date($date_format,$s->end);
        $time_end  =mysql2date($time_format,$s->end);
              "$date_start $time_start","$date_end $time_end",__('to','ec3'));
      return sprintf($format_wrapper,$result);

    You would have to use echo in the {php} tag to get the output.

    I hope this works!

  • 144. Pat  |  April 28th, 2008 at 10:02 pm

    1) you code throws

    Fatal error: Call to a member function get_results() on a non-object in /home/vhosts/ on line 545

    which is the first line here:

    “SELECT post_id,start,end,allday,rpt,IF(end>=’$ec3->today’,1,0) AS active
    FROM $ec3->schedule
    WHERE post_id = $ID
    ORDER BY start”

    2) could you give me an example how to use it in my templates, i have an idea, but you would save me some time in trying. my guss is like this:

    {php: echo (ec3_get_schedule_byID($result->ID));}{link}

    3) send me a mail if you like to have ftp access to my site, it’s in testing until may 1st anyway,


  • 145. Chris McLaren  |  April 28th, 2008 at 10:04 pm

    Rob @ 140: Great.

    I picked up the updates today and it totally solves the problem.

    Talk about a great response time!



  • 146. Rob  |  April 28th, 2008 at 10:21 pm

    PAT: I think your output template looks about right (you probably don’t need the ( and ) with the echo but they should do no harm).

    The error message is because I didn’t make $wpdb global. Go to the top of the function where it says

    global $ec3;
    and make it
    global $ec3, $wpdb;

    Good luck!

  • 147. Pat  |  April 28th, 2008 at 11:06 pm

    so brillant!!!!!

    thank you very much, you made my day!

  • 148. Rob  |  April 29th, 2008 at 12:17 am

    Pat: Looks good!

  • 149. ayutheos  |  April 29th, 2008 at 12:38 pm

    I’d like to have an archives page showing x no. of random posts.

    I have set up WP as a photoblog, and have my post thumbnails as the excerpt of the post.

    I’ve tried setting the output format to {excerpt}, which doesn’t show anything.

    {image} *almost* does what I want except that it can’t get the thumbnails to scale properly as squares, and doesn’t show additional thumbnails for posts with more than 1 image.

    Any help with what I’m trying to achieve? Thanks in advance!

    WordPress 2.5.1, Post-Plugin Library 2.5b24, Random Posts 2.5b24

  • 150. Pat  |  April 29th, 2008 at 11:32 pm

    coming back once more to the eventcalender3 intgration, do you see an easy way to sort the entries not by relevance but by eventcalendar date?

    here you see, that events i may are listed before events in april, which is a bit awkward..


  • 151. Rob  |  April 30th, 2008 at 7:45 am

    Pat: ‘Not easily’ is the short answer!

    You could replace similar_posts() with $s = SimilarPosts::execute(); which would give you the output as a string instead of echoing it directly to the page. In principle you could manipulate that string in any way you wanted including reordering the list elements — but I think the regex skill would be daunting.

  • 152. Stuart  |  April 30th, 2008 at 8:20 am

    Hi Rob,

    I am trying to produce an image thumbnail followed by a link at the end of posts using the latest version of similar posts.

    Similar to Sue above on the 15th April ie

    Hi Rob,
    for similar posts, I have made this my output template:

    however, the thumbnails for the images are not appearing.

    I have also tried it without the px and placing a space between the number and the px all to no avail.

    What am I doing wrong?
    Many thanks,

    I have tried every combination I can think of. But its not working.

    This produceas a full size image and a link next to it:


    But thats no good to me, because the images are too large.

    The images are pulled from a merchant, so are external links.

    What I need is a set of 5 hyperlinked thumbnail 50 pixels by 50 pixels (to the link location), with the normal link next to them.

    Any ideas?



  • 153. Stuart  |  April 30th, 2008 at 8:40 am

    PS Rob.

    I also notice that when I hover over the post (using the standard structure ie {link} – That it shows the date of the post.

    Is there any way to NOT have it display?

  • 154. Stuart  |  April 30th, 2008 at 8:42 am

    PS I also notice that when I hover over the links using the normal layout code in similar pages ie {link} that it shows the date of the post.

    Is there anyway to do it so that the date DOESN’T show?

  • 155. Stuart  |  April 30th, 2008 at 8:44 am

    PS I also notice that when I hover over the links using the normal layout code in similar pages ie {link} that it shows the date of the post.

    Is there anyway to do it so that the date DOESN’T show up?

  • 156. Stuart  |  April 30th, 2008 at 8:51 am

    PS I also notice that when I hover over the links using the normal layout code in similar pages ie {link} that it shows the date of the post.

    Is there anyway to do it so that the date DOESN’T show?

    PPS Apologies if this comment shows up a couple of times Rob. Your comments page seems very ‘flaky’ at excepting comments. I tried submitting it twice, but it said I had already submitted it (despite the fact it didn’t show up).

    And I am trying to do the ‘brain work’ today. So would be get to get this figured out 😉

    Thanks for your help.


  • 157. Rob  |  April 30th, 2008 at 10:05 am

    Stuart: The output template tags let you be very flexible about what is displayed. The {link} tag is really a shortcut for a longer expression. If you want a link without tooltip you should build it yourself, e.g.:
    <a href="{url}">{title}</a>

    The {image} tag can take arguments:
    should output the first image (i.e., #0) with the dimensions you want. If you have more than one image per post you would have to repeat the tag, e.g.:

    I hope that makes sense.

  • 158. Stuart  |  April 30th, 2008 at 10:25 am

    Hi Rob,

    Makes perfect sense.

    The ‘link without a tooltip’ line worked great.

    Thanks for that.

    But the image one didn’t. You can see what I mean if you have a look at any of the product pages on the site and scroll down.

    Currently I have it set to:

    <li>{image:0:25:25}<a href="{url}"> * {title}</a></li>

    In the output template.

    It shows the images. But it doesn’t change their size, regardless of what I set the values to.

    Is there a way of doing that?

  • 159. Simone Brunozzi  |  April 30th, 2008 at 12:15 pm

    Problem with feeds: when I add a new post, the “related posts” on older posts change, but since those posts are different than before, they seem “unread” in feed readers.
    People don’t like it, since they’ve already read the old post.

    How can I solve this?
    Thanks for any help :-)

  • 160. Rob  |  April 30th, 2008 at 3:11 pm

    Simone Brunozzi: That’s interesting I’m not seeing anything like that here: can you let me know ‘how’ you serve your feeds or if it is particular feed readers that have this problem?

  • 161. Simone Brunozzi  |  April 30th, 2008 at 3:47 pm

    Rob: check out, subscribe to feeds; you’ll notice it shortly.
    I don’t believe it is a particular feed reader. Will check later.
    Thanks for your feedback!

  • 162. Rob  |  April 30th, 2008 at 5:20 pm

    Simone: I’m subscribed and I’ll keep my eye on the feed…

  • 163. xihad  |  April 30th, 2008 at 7:03 pm

    hi Rob,

    thnx for the great plugin. in the recent comments widget i just want to show only the url of last five commented post with the comment count and last commenter to comment and there should not be repeatation of any post link.

    how can i do that?

    thnx once again :)

  • 164. andras  |  April 30th, 2008 at 7:40 pm

    Thanks for the tips again. I got what I wanted by writing the Recent Posts output to a .txt doc and then opening that file into a .php page on the main site. Great plugin!

  • 165. Simone Brunozzi  |  May 1st, 2008 at 12:01 pm

    Rob: my friend uses netnewswire as feed reader.

  • 166. Stuart  |  May 1st, 2008 at 4:03 pm

    Hi Rob,

    So is this correct and should work?:

    <li>{image:0:25:25}<a href="{url}"> * {title}</a></li>

    Or have I set that out wrongly?

    Or, is there some bug or other with the {image} tag in the plugin which explains why it isn’t working?

  • 167. Stuart  |  May 1st, 2008 at 4:51 pm

    Forget the last post Rob.

    Just read the email you sent.

    Thanks for that man.

    The new code works great.



  • 168. Rob  |  May 2nd, 2008 at 10:50 am

    xihad: The plugin wasn’t designed to do what you want but, after some playing around, I think I can approximate what you want. You need to set the output to be grouped by post and use something like this in the Group Title template:

    {url} ({commentcount}) - {commenter}

    I wasn’t sure if you wanted the {url} or the {link}. You also might want to wrap the template in <li> ... </li> tags.

    You will also need to ‘hide’ the normal output template .. I suggest using just a non-breaking space &nbsp;.

    This is an approximation because it is the now invisible comments which govern the number of items output, so if all your recent comments were on one post you would only have one item showing in your output.

  • 169. Rob  |  May 2nd, 2008 at 10:54 am

    Simone: That’s a mac program so I can’t download it for a closer look.

    BTW, so far there have been no repeats of your feed in Google Reader.

  • 170. xihad  |  May 3rd, 2008 at 7:20 am

    hi Rob,

    it worked great man!! almost doing what i really wanted :)

    only one prob.. after applying ur solution comment count and last commenter name are showing under the link.but i want them in the same line. is it possible to do??

    thnx a lot again. wishing u all the best…


  • 171. xihad  |  May 3rd, 2008 at 8:01 am

    hey… sorry for disturbing u again… 😛

    i have already solved the prob wat i mentioned above :)

    but now another prob i have started to notice :( i want the post that has been commented lastly should be at the first position of the list and other posts should follow accordingly.but now posts are showing according to the date they have benn published.

    is it possible to do??

    waiting to hear something mirracle from u 😀

    take care.

  • 172. Rob  |  May 3rd, 2008 at 10:34 am

    xihad: I think you have defeated me and my poor overstretched plugin! I think you might have to resort to some hand-crafted code to get what you want.

  • 173. xihad  |  May 3rd, 2008 at 4:57 pm

    ha ha ha.. sorry man. its all my fault.. i wanted too much… 😀

  • 174. froNau  |  May 5th, 2008 at 10:26 pm

    Hi Rob!

    Im trying to change to “title” tag. Because i staying a result’s link. After all, that link showing a date. I showing like this:

    Similiar Posts

    and if i staying on Hi to All :) its html title tag is showing date.

    How can i change it to just post’s name?

    Thanks for helping.

  • 175. Rob  |  May 5th, 2008 at 11:25 pm

    froNau: If I understand you correctly you can just use {title} as your output template. If you want the post’s title to be linked back to the post you can make the output template something like:

    <a href="{url}">{title}</a>

    Is this what you mean?

  • 176. boxday  |  May 6th, 2008 at 5:56 am

    First off, thank you for this amazing plugin!

    Secondly, I’m using {link}{image:0:150:100} to get three of the most recent posts. Is there a way I can turn the image it’s pulling from each post into the actual link back to that post? In other words, it would only be displaying the image and if clicked would take you to the post it correlates.

    Thank you again for the great plugin!

  • 177. Rob  |  May 6th, 2008 at 9:54 am

    bixday: Have you tried:

    <a href="{url}">{image:0:150:100}<a>

    You might want to add a title attribute to the anchor too.

  • 178. Stuart  |  May 6th, 2008 at 5:44 pm

    Hi Rob,

    I wondered if you could help.

    I am using your three plugins and they are working great.

    However, I am trying to figure out how to get the output to create a category page something like this:

    The problem I am coming up against is that the number of products in each category could vary say between 1 and 100.

    I can come up with a query that can produce one long skinny column. By embedding the code in a table.

    <table width="100" border="0" cellpadding="50">
        <td><?php recent_posts('limit=50&output_template=<li><a href="{url}">{image:0:100:100}</a><u><a href="{url}"></u><br> * {title}</a></li>&match_cat=true&prefix='); ?></td>

    However, there is no intelligence there in terms of the number of products in a category.

    ie If there are say only six products in a category rather then 1, then I would want 4 along the top, and then two on the next row,

    Not a list down the side of all 6, because it looks odd.

    Do you understand what I mean?

    I want it to show 4 on one row. And then wrap to the next line etc etc for the next four.

    So, regardless of whether the category has 1, 5 , or 50 products it looks normal.

    I know this can be done somehow. I just haven’t been able to figure it out yet!! 😉

    Any ideas Rob?

  • 179. Stuart  |  May 6th, 2008 at 5:55 pm

    Hi Rob,

    I am using your plugins successfully, and they are working great.

    However, I am trying to get the category pages to look something like


    ie Images with the title underneath.

    Now, I have figured out how to do this for one, by embedding it in a table tag.

        <?php recent_posts('limit=50&output_template=<a href="{url}" rel="nofollow">{image:0:100:100}</a><a href="{url}" rel="nofollow"> * {title}</a>&match_cat=true&prefix='); ?>

    However, there is no intelligence in that.

    ie If There are six products then it shows up as a narrow list down the side.

    The number of each products in a catgeory varies greatly, so I want it to wrap.

    ie Show 4 on one row, and then when the fifth one is added it goes on to row 2 etc etc.

    So regardless of whether a category has 2 posts or 60, it will look normal.

    I am sure this is possible with this.

    Any idea what query/code I need?

    Thanks Rob.

  • 180. Rob  |  May 6th, 2008 at 6:10 pm

    Stuart: The best way of approaching this question is to consider how you would get the effect you want in an ordinary HTML layout with a bunch of images and some text. Rather than using a table I’d go for using the CSS float property. For examples try Floatutorial or Code Central.

    Then when you have the idea work out how to translate that into an output template. Basically you have the right idea but just need to apply some CSS classes as well.

  • 181. boxday  |  May 6th, 2008 at 10:02 pm

    Works like charm! Thanks you!

  • 182. boxday  |  May 6th, 2008 at 10:03 pm

    Works like a charm! Thank you!

  • 183. Stuart  |  May 7th, 2008 at 11:09 am

    Hi Rob,

    Thanks for the links.

    I have just spent a few hours trying to get this effect,
    but don’t seem to be having much luck.

    Using the css code from those float tutorials


    float: left;
    width: 100px;
    border: 1px solid #999;
    margin: 0 15px 15px 0;
    padding: 5px;

    And the earlier code.

    <?php recent_posts(‘limit=50&output_template={image:0:100:100} * {title}&match_cat=true&prefix=’); ?>

    I can get it as a straight line.

    But the problem is in the wrapping.

    The same code will work on normal images ie produce them vertically across the page. But with the output from the plugin, it won’t because the post limit is more then 1, so it treats it as a whole block, and doesn’t wrap after individual entries.
    It just produces one long line.

    See what I mean here

    I am trying to think of workarounds. And reading carefully through this instructions page I did have a couple of other thoughts:

    1/ In the CSS tutorials they use this function to force a line break

    .clearboth { clear: both; }

    I see that you have this function: {if:condition:yes:no}

    Is there some way of specifying within the code

    ‘If four items are retrieved then insert .clearboth { clear: both; }’

    ie so after every four items it would wrap?

    Or, some other condition that could be specified in code eg The last four from a category, or once four images and four titles have been retrieved?

    2/ The {php:code} tag or the custom-op tags?

    Can I do something with those to make it happen?

    Logically, these are all pulling the recent entries from the same category.

    So I would of thought there must be something for it to use?

    I really want to avoid individually specifying 50 different items. Which is possible if I use the ‘skip’ tag with the code above 50 times.

    eg <?php recent_posts(‘limit=1&output_template={image:0:100:100} * {title:20:wrap}&match_cat=true&prefix=’); ?>

    <?php recent_posts(‘limit=1&skip=1&output_template={image:0:100:100} * {title:20:wrap}&match_cat=true&prefix=’); ?>

    <?php recent_posts(‘limit=1&skip=2&output_template={image:0:100:100} * {title:20:wrap}&match_cat=true&prefix=’); ?>

    etc etc until you get to 50, and put them in tables.

    Because the page loads would get too much.

    I really want to find an elegant solution to this that only requires 1 php call.

    ie So that I can set the limit as 50 as above only once, but it knows when to wrap.

    The other thought I had was to have four of these on the page. Each next to each other.

    ie Four columns in effect. But to the eye it would look like they were wrapping.

    The problem with that was that I still can’t see how to get it to go vertically across the page first, before going down.

    Any ideas Rob?

    I am quite willing to work at this. But I have reached a bit of a dead end.

    So any suggestions would be appreciated.



  • 184. Stuart  |  May 7th, 2008 at 11:25 am

    Hi Rob,

    (Hope this doesn’t post multiple times. It keeps saying its a duplicate?
    But then doesn’t show up?)

    Thanks for the links.

    I have just spent a few hours trying to get this effect,
    but don’t seem to be having much luck.

    Using the css code from those float tutorials


    float: left;
    width: 100px;
    border: 1px solid #999;
    margin: 0 15px 15px 0;
    padding: 5px;

    And the earlier code.

    <?php recent_posts(‘limit=50&output_template={image:0:100:100} * {title}&match_cat=true&prefix=’); ?>

    I can get it as a straight line.

    But the problem is in the wrapping.

    The same code will work on normal images ie produce them vertically across the page. But with the output from the plugin, it won’t because the post limit is more then 1, so it treats it as a whole block, and doesn’t wrap after individual entries.
    It just produces one long line.

    See what I mean here

    I am trying to think of workarounds. And reading carefully through this instructions page I did have a couple of other thoughts:

    1/ In the CSS tutorials they use this function to force a line break

    .clearboth { clear: both; }

    I see that you have this function: {if:condition:yes:no}

    Is there some way of specifying within the code

    ‘If four items are retrieved then insert .clearboth { clear: both; }’

    ie so after every four items it would wrap?

    Or, some other condition that could be specified in code eg The last four from a category, or once four images and four titles have been retrieved?

    2/ The {php:code} tag or the custom-op tags?

    Can I do something with those to make it happen?

    Logically, these are all pulling the recent entries from the same category.

    So I would of thought there must be something for it to use?

    I really want to avoid individually specifying 50 different items. Which is possible if I use the ‘skip’ tag with the code above 50 times.

    eg <?php recent_posts(‘limit=1&output_template={image:0:100:100} * {title:20:wrap}&match_cat=true&prefix=’); ?>

    <?php recent_posts(‘limit=1&skip=1&output_template={image:0:100:100} * {title:20:wrap}&match_cat=true&prefix=’); ?>

    <?php recent_posts(‘limit=1&skip=2&output_template={image:0:100:100} * {title:20:wrap}&match_cat=true&prefix=’); ?>

    etc etc until you get to 50, and put them in tables.

    Because the page loads would get too much.

    I really want to find an elegant solution to this that only requires 1 php call.

    ie So that I can set the limit as 50 as above only once, but it knows when to wrap.

    The other thought I had was to have four of these on the page. Each next to each other.

    ie Four columns in effect. But to the eye it would look like they were wrapping.

    The problem with that was that I still can’t see how to get it to go vertically across the page first, before going down.

    Any ideas Rob?

    I am quite willing to work at this. But I have reached a bit of a dead end.

    So any suggestions would be appreciated.



  • 185. Rob  |  May 7th, 2008 at 2:23 pm

    Stuart: First the trouble posting is due to two things: sometimes you get classified as spam! and sometimes your post gets moderated because it contains links.

    The problem with the layout is that you are applying the thumbnail class to the outer div when it should be applied to each item in the list. Something like:

    <div class="thumbnail"><a href="{url}">{image}</a><a href="{url}"> * {title}</a></div>

    Now you may have some difficulty if your image blocks are not all the same size so you may want to trim the titles.

    Let me know if this all makes sense to you (and actually works!).

  • 186. Stuart  |  May 7th, 2008 at 5:51 pm

    Thanks Rob.

    That helped tremendously. That code doesn’t work out of the box. But I understood perfectly what you meant, and so did some more experimenting!

    If you apply the div to a single instance then it treats it as a block. If you apply the div in the template then it applies it individually. Makes sense.

    (Actually Rob, little suggestion then. Would be good to have extra output boxes in the main section. And be able to choose which one to apply. That way, when there is a situation where the code needs to be applied individually, rather then on a block. It would mean you could have more then 1 output. As it is you can only have one ie because the output template can only be applied individually when its in the main settings. Otherwise you have to create multiple instances on the same page all ostensibly doing the same thing.

    Understand what I mean?

    For this site for example, I have had to remove the code that was producing the front page links to categories, and put each one individually in the page 18 times to make it work the same way (ie because getting the categories to look right is more important). When if there had been another output box on the main screen it would have been better done that way. Anyway, just a thought ;))

    Its a bit of a phaff to get it to work even then (div wise I mean. The plugin does exactly what it says on the tin!)

    The trick is to nest divs in the output and treat the image and the caption seperately div wise, and then put both of those inside another div ie 3 divs.

    The advantage of doing it that way i.e seperately for the image and the caption, and then overall. Is that you can specify the height attribute for the caption (and the image if they are different sizes). Which means that you don’t have to trim anything. You just specify a slightly larger overall box size that can take the variations. And that also means it doesn’t matter when an image etc is missing. As the box size is a constant.

    So, no gaps!

    Thanks again for your help Rob. Have a look at the link I posted earlier and you can see the results.



  • 187. Rob  |  May 7th, 2008 at 6:13 pm

    Stuart: That’s good news — it’s looking pretty smart.

    The latest version, 2.5b25, has the possibility of sorting output in various ways; would that help your multiplication of tags? Genuine question–I can see it might but I haven’t thought it through.

    Also, if you are introducing a div each for the image and the caption why not apply the styling directly to those elements and save yourself the extra divs? You might have to add display: block here and there is all.

  • 188. Stuart  |  May 7th, 2008 at 7:13 pm

    Hi Rob,

    I just downloaded and installed 2.5b25 for recent posts and the plugin library and had a look.

    I don’t think that will help.

    That looks like it might be useful where you have multiple, but different, individually specified instances on a page.

    It doesn’t address where you have a lot of the same instance repeated multiple times.

    For that I think you need multiple Output Template boxes in the output settings.

    With the home page category linking Rob, it would definitely help to be able to specify additional outputs in the main admin area, rather then individually on the page itself.

    (Similarly for the related pages and random plugins as well. I am also using those in various spots, and can now see that would help)

    I did originally have it on the page anyway before our div discussion.

    But, after having tried out your suggestion of having the divs in the output box directly, I can see that I could achieve the effect of having the category links on the home page in the same way. ie only having one php call in the page and not 18.

    However, because there is only one output box, I essentially have to choose between getting the category page right. Or the home page.

    The home page is only one page. So the category pages get the vote.

    But it would become much more flexible if additional outputs were specified. And because essentially the number of php calls on the server would be lessened, it would almost certainly speed up how fast the pages load.

    Will have a crack at optimising the div codes.

    I am feeling quite relieved it works at all 😉


    PS Sent you a fiver to buy a beer.

  • 189. Rob  |  May 7th, 2008 at 9:51 pm

    Stuart: Thanks for the beer!

    I still think I’m not getting you on the multiple output templates thing. Wouldn’t each output be a separate query anyway? I think I am not fully getting your drift.

  • 190. Stuart  |  May 7th, 2008 at 10:08 pm

    Ok. Right.

    Take my home page as an example.

    The code to generate the latest cable products is your similar posts plugin.

    etc etc.

    These are all repeated because I can’t use the Output Template to generate it, because its being used by another query.

    If it wasn’t I could just use divs in the output template in the same way I did for the category pages, and one php call could generate all of them.

  • 191. steve  |  May 8th, 2008 at 8:38 am


    Not sure if this has come up, but when using Recent Comments (WP 2.5, PHP 5) there is something buggy with the include/exclude cat check boxes…they seem to stick and dont save all the time. I do have several parent/child cats…

    Otherwise works well. THX

  • 192. froNau  |  May 8th, 2008 at 5:38 pm

    Hey Rob.

    I fixed my problem. But i use your post’s “title” tag like this:

    <? similar_posts(‘limit=5&output_template=< {title} >’); ?>

    This is fuckin’ great. I was fixed all problems but only left this. I did it! Thank you bro!

    (my blog: [opening coming soon like 3 – 5 hrs. after, lang: turkish])

  • 193. Stuart  |  May 8th, 2008 at 6:26 pm

    Hi Rob,

    Found a little bug.

    Just upgraded to PHP 5 from 4.

    Your scripts were broadly ok. But one element that did stop working was the thumbnails.

    Site wide they all went. Other images were ok. Just the thumbnails.

    I will hold off getting them to roll back to PHP 4 so you can have a gander.

    But will have to change it back soon, because PHP 5 seems to be more problem then its worth.

    Still, PHP 4 will stop being supported as from August 2008. So, it may be as well to figure out any ‘issues’ it has prior to that.



  • 194. Stuart  |  May 9th, 2008 at 9:37 am

    Update on the above Rob.

    I have had a chat with my hosts. Seems the problem was that the default PHP 5.26 install, wasn’t installed with cURL support.

    Anyhow, the guy re-did it with it, and all the thumbnails now work.

    So, I don’t think theres a problem with PHP 5. If anyone has the same issue they just need to get cURL added and it should work.

  • 195. Kelly  |  May 9th, 2008 at 12:23 pm

    Hi there and thanks for all the work you are putting in with the support side of the plugins – great to see.

    I’ve installed the plugin, activated it but don’t get anything showing up on my posts.

    When I check to see if the settings are all as they should be (I’ve basically left the defaults) I go back to manage the index … still nothing.

    There is a good chance that I am missing something silly and I really hope that I’m not wasting your time.

    Hope you can help.


  • 196. Rob  |  May 10th, 2008 at 10:17 am

    steve: The category exclude checkboxes seem to be working OK here… Can you submit a bug report from the settings page giving me a bit more detail then maybe I can reproduce the problem and fix it? Thanks.

  • 197. Rob  |  May 10th, 2008 at 10:46 am

    Kelly: Can you make a bug report from the plugin’s settings page? It will give me some extra details that might help me reproduce your problem. Could you also tell me how you are using the plugin (widget? content filter? similar_posts() in your theme?)?

  • 198. David Robertson  |  May 10th, 2008 at 4:50 pm

    Superb plugin! Installed it today and it’s running related posts fine. I’m using thumbnails and would like to have the text to the right of the image rather than underneath. Can I set this in the plugin output options or is it a CSS thing?

    Here’s a page from my site – scot-image

  • 199. Printer  |  May 11th, 2008 at 7:23 pm

    @David Robertson:
    I think it should be something like:
    <li><a href="{url}">{image:0:40:40} {title}</a></li>
    The image thumbnails does not seems to work on my NextGen-Gallery(plugin) images in my posts (all of them in my case). There should be a way the plugin can recognize them it as an img?

  • 200. Adriano Estevam  |  May 11th, 2008 at 9:29 pm

    Thanks for your work with this plugin. Tt’s realy great.
    Is there a way call the podpress player in the output template? I’m working on a podcast section to show random programs, i i would like to show the player as well.
    Thanks again,

  • 201. Rob  |  May 11th, 2008 at 9:46 pm

    Printer: The {image} tag looks for <img> tags in the raw text of the post — are your images inserted like that or does the plugin do some magic between raw post and output? It would be easy enough — though with some overhead — to apply filters to the raw content before hunting for images.

  • 202. Rob  |  May 11th, 2008 at 9:52 pm

    Adriano: I’m sure it would be possible but I have no idea how podpress works. How do you get the player to show up in posts under ordinary circumstances?

  • 203. Muten  |  May 11th, 2008 at 11:23 pm

    This is one of the most well written plugins I’ve seen for WordPress – great job author!

  • 204. Printer  |  May 12th, 2008 at 12:04 am

    Rob, I’m not sure. The NextGen-gallery plugin works with the use of a tag in the post, for example: [singlepic=39,320,240,,left] the first number is referring to the ID number of the image in the gallery. Or a placement of a whole gallery like [gallery=1]

  • 205. Muten  |  May 12th, 2008 at 3:43 am

    Is it possible to have Recent Posts wrap a post link around an image?

  • 206. Tony  |  May 12th, 2008 at 5:38 am

    For similar posts, how can I specify the string that the php function uses as a base of comparison for similarity?


    What I’m getting it in the example is if I wanted to force similar posts to find posts based upon my own keyterm “Smurfs” would it be possible?

  • 207. Adriano Estevam  |  May 12th, 2008 at 8:57 am

    Thanks for the reply Rob.
    Well, Podpress works within the loop (i guess). As long your template has the wp_head() and wp-footer(), works fine…
    You can choose in the podpress admin area if you want at the beguining or at the end of the post…
    Humm…Does that help? =7

  • 208. David Robertson  |  May 12th, 2008 at 9:05 am


    {image:0:40:40} {title}

    Thanks, but that’s not what I’m looking for. I would like the text to start at the top of the image. align="" works elsewhere for me.

    See the Alamy image on my homepage to see what I mean.

  • 209. Rob  |  May 12th, 2008 at 10:11 am

    Printer: If you are willing to experiment for me … open up /post-plugin-library/output_tags.php and find the function otf_image.

    The first line of code in the function is:

    if (!preg_match_all('/<\s*img.+?>/i', $result->post_content, $matches)) return '';

    Replace that line with

    if (!preg_match_all('/<\s*img.+?>/i', apply_filters('the_content', $result->post_content), $matches)) return '';

    With any luck this will allow the gallery plugin to do its work before the {image} tag goes searching for images.

    Let me know if it works and I will make it an option.

  • 210. Rob  |  May 12th, 2008 at 10:14 am

    Muten: It depends where you want the link to go… You just need to build the right output template, e.g.,

    <a href="{url}">{image}<a>

    links the image back to the post which contains it.

  • 211. Rob  |  May 12th, 2008 at 10:17 am

    Tony: You’d have to hack the function sp_terms_to_match

  • 212. Rob  |  May 12th, 2008 at 10:30 am

    Adriano Estevam: I’m afraid it doesn’t help a lot! If I get time I’ll have a look at podpress. The solution might be simple or it could be impossible — no way to tell yet.

  • 213. Printer  |  May 12th, 2008 at 10:47 am

    Great, I’ve tried it and that works!

  • 214. Printer  |  May 12th, 2008 at 10:19 pm

    Rob: Maybe I’m doing something wrong, but it seems like the img thumbnails are still a resize of the original image and not thumbnailed?

  • 215. Printer  |  May 12th, 2008 at 10:25 pm

    @David Robertson

    {image:0:40:40} {title}
    Thanks, but that’s not what I’m looking for. I would like the text to start at the top of the image. align=”” works elsewhere for me.

    I’m not sure what you mean, but is’nt that possible through your stylesheet?..

  • 216. Rob  |  May 12th, 2008 at 10:39 pm

    Printer: Yes, you are correct. I backed off on serving real thumbnails because the resizing script was a) slower than serving the images themselves and b) causing configuration problems on many hosts.

  • 217. Printer  |  May 12th, 2008 at 10:58 pm

    Ah, i see :(

  • 218. David Robertson  |  May 13th, 2008 at 7:51 am

    Printer: I managed the text wrap with CSS and

    I’m learning as I go.

  • 219. Steve  |  May 14th, 2008 at 12:03 am

    This is a great, intuitive plug-in… I’ve made a section in my right sidebar where an image (from a custom field) shows up. When I link it to the post via , a rectangle appears around the picture. It is a dark grey rectangle that turns light grey on hover. This is consistent with my theme, but I can’t figure out why my theme would cause this. Is there something I can do on the plug-in side to stop it from creating this border when the image is linked? (To be clear, there is no border when the image is not made into a link). Thanks

  • 220. Steve  |  May 14th, 2008 at 12:23 am

    Nevermind, I just disable all borders for all images in css and it’s ok now. Sorry to trouble you. Thanks so much for a very useful plugin

  • 221. Rob  |  May 14th, 2008 at 11:14 am

    Steve: Glad you worked it out.

  • 222. Jace  |  May 14th, 2008 at 12:22 pm

    I have used this plugin for SO long without ever saying thank you

    so, here ya go…THANK YOU!

  • 223. Tom  |  May 14th, 2008 at 6:02 pm

    Is there any way I can Crop an Image?
    es. {imagecrop:0,50,50}

  • 224. Rob  |  May 14th, 2008 at 9:32 pm

    Jace: You are WELCOME!!

  • 225. Rob  |  May 14th, 2008 at 9:34 pm

    Tom: I’m sorry there’s no way currently to show an image cropped.

  • 226. Tom  |  May 14th, 2008 at 11:29 pm

    OK, Thanks,
    Do you have a way to get the link of the first image in the post?

    Thanks a lot for your work and for replying to my comments.

  • 227. Rob  |  May 15th, 2008 at 9:18 am

    Tom: What do you mean by ‘the link’?

  • 228. Tom  |  May 15th, 2008 at 9:42 am

    Morning Rob,
    I mean the url to the first image of the post.

  • 229. Matheus Siqueira  |  May 15th, 2008 at 6:51 pm

    I’m having a dificulty of inserting similar posts in the place of this piece of code:

    $cat = get_the_category_excludeCat(); $cat = $cat[0];
    $args = array(
    'numberposts' => '4',
    'offset' => '1',
    'category' => $cat->cat_ID );  ?>
    global $post;
    $myposts = get_posts($args);
    foreach($myposts as $post) :
      <div class="box">
    	<ul class="quiet meta_list alignleft">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php $key="small_photo"; echo get_post_meta($post->ID, $key, true); ?>" alt="" / style="width:108px; height:72px; padding-top:5px; padding-right:5px; padding-bottom:5px;"></a>
        <div class="<?php post_style(); ?>" id="post-<?php the_ID(); ?>">
    	  <h6><a href="<?php the_permalink(); ?>">
    <?php the_title(); ?>
            <?php endforeach; ?>

    I’m trying to insert the similar posts in the same format that it currently is ( Could someone please help me on how could I modify the output to achieve the same result?


  • 230. Sennin  |  May 16th, 2008 at 10:31 am

    Hi. I have a multilingual blog and am currently trying to filter comments belonging to a post that doesn’t have a translation for the currently displayed language version.

    Basically, when a post is not translated the {title} will contain “Not available in English.” Can I detect this somehow? I’ve tried to use the {if} tag to skip such comments but with little success – it seems to fail when used to envelope the whole output.

  • 231. Rob  |  May 16th, 2008 at 3:45 pm

    Tom: The next beta has an {imagesrc} tag which pulls the url from the src attribute of an <img> tag.

  • 232. Rob  |  May 16th, 2008 at 3:49 pm

    Matheus Siqueira: As you can see your code got badly mangled so I can’t hazard an answer. Perhaps you’d like to contact me by email with the code example.

  • 233. Rob  |  May 16th, 2008 at 3:57 pm

    Sennin: I don’t understand the phrase: it seems to fail when used to envelope the whole output.

    The {if} output tag should help you. How far does something like this get you?

    {if:$result->post_title !== 'Not available in English':{commentlink}}

  • 234. Tom  |  May 16th, 2008 at 7:55 pm

    Thanks Rob that sound great!!!

  • 235. gofree  |  May 17th, 2008 at 8:42 am


    Is {snippet:50} used to limit the characters? How do I limit the character of Recent Post or Recent Comment?


  • 236. Rob  |  May 17th, 2008 at 3:14 pm

    gofree: If you want a snippet you can limit it to 50 characters that way. But I have the feeling you are asking more than that… am I right?

  • 237. gofree  |  May 17th, 2008 at 4:10 pm

    Yes. Normally if there are more words to continue, we show “Read more” or “…” sign to tell that this sentence is yet finished. I wonder how to do that with the post.

    {image} is by meant to call the first image in the post? Can we resize upon calling? How?

    {gravata} with Recent Comment is no way to resize upon calling either?

    Thanks, and sorry if I am asking too much.

  • 238. Rob  |  May 18th, 2008 at 9:01 am

    gofree: All that information is given up above in the section on the output template tags. Each of the tags you mention has parameters to do the job you want.

  • 239. Peter Henrichsen  |  May 18th, 2008 at 10:35 am


    Fantastic plugin! I’m so thankfull!

    But I have a little problem with the syntax, though:

    In the output section, in the box “Output template” I write:


    Because I just want the first image of each post, in a width of 200 pixels. I also tried writing 200px but the result is the same. I get some small thumnails that almost looks good, but their vary. Especially if it’s a landscape and a portrait oriented pictures it looks awkward.

    You can take a look at:

    The plugin is placed in the right sidebar, just under the Google Adds.

    It must be me who don’t understand the syntax?

    Apart from that small problem it’s a great plugin, and I’m very thankfull for using it.

    Best Regards Peter (Copenhagen, Denmark)

  • 240. Rob  |  May 18th, 2008 at 11:43 am

    Peter Henrichsen: The {image} output tag can output the image as it is, the image resized to specified dimensions, or the image to fit in a square bounding box if only one dimension is given. That’s the way you are using it so portrait and landscape images will look very different. Give me some time to consider how to change things to let you (and others) do what they want.

  • 241. Peter Henrichsen  |  May 18th, 2008 at 12:15 pm

    Dear Rob

    Thank you so much for your answer. I’m not sure I understand you answer, but I’m very glad and thankfull that you want to consider things.

    From your “parameter manual” above it says: “If the height is omitted width is used. ” And all I want is a width of maybe 200px, and then it’s ok for the height to vary on each post image.

    My box surrounding the text and image will via the css just follow the variable height of the picture. So it’s ok for me that the height vary, if just the width is fixed.

    I’m not absolutely sure we understand each other, because from your answer it sounds like it’s no problem to get a fixed width?

    The peculiar thing for me, is that both the pictures width and height vary for each post, as it is now at my site.

    None of the resized pictures has the same dimension, as I see it now?

    If I use a fixed width of 200px I’m well aware that my portrait mode images will be almost the double size of the landscape mode images. And that’s also fine with me, if just the width is fixed for every image.

    Thanks & Best regards


  • 242. Peter Henrichsen  |  May 18th, 2008 at 12:22 pm

    Oh, just another comment, looking at my site again.

    Since all my pictures at has a width of 490px in the main column, I find it peculiar that for example two portraitmode images gets different widths after the plugins resize.

    That why I get in doubt about my use of the syntax, because then I looks more lige a fixed height – but again, not for the landscape mode image.

    So I’m a bit confused :-)

    Best wishes Peter

  • 243. Peter Henrichsen  |  May 18th, 2008 at 1:08 pm

    Now I can se a system : :-)

    My resized images is all 236 pixels on the longest side!

    When I have this written:

    {image::230::::}{link} – {snippet:150:word} …

    Do you know why that is?

    Best Wishes Peter

  • 244. Rob  |  May 18th, 2008 at 2:43 pm

    Peter Henrichsen: When I look at the source of your web page all the images are 230 +/- 1px on the longest side which is the predicted behaviour. The kind of behaviour you want is easy to implement but I have to think how to make an interface to it available — the {image} output tag is growing unwieldy.

  • 245. Peter Henrichsen  |  May 18th, 2008 at 2:56 pm

    Ok, that’s fine :-) and it would be great if you could manage a fixed width in the plugin. Thx!

    I just don’t think it’s a predicted behaviour: I mean when you assign a fixed width to an image, it’s not logical that it’s really the heigth that is adjusted on all portrait mode images.

    I know that most modern web-designers think that images on content management systems only should be landscape mode, because it’s more “readable”, but I think the scroll function and the narrow coloumns in WP is perferct for portrait mode pictures.

    But it would be great if you have time to fix it someday :-)

    best wishes Peter

  • 246. Rob  |  May 19th, 2008 at 3:28 pm

    Peter: It’s implemented … now I am testing it for holes!

  • 247. Peter Henrichsen  |  May 19th, 2008 at 4:38 pm

    Hi Rob!

    Sound Great! Can I help?

    I really look forward to it, because I had to compromise and make smaller thumbs and center align them. Then they will fit into my boxes.

    But a real fixed width would be super nice!

    Best wishes Peter

  • 248. Rob  |  May 19th, 2008 at 4:46 pm

    Peter: In the new version ( of the Post-Plugin Library the {image} tag handles the kind of fixed-width scaling you were looking for. Just use a ‘?’ for the dimension you want to vary, e.g.:
    {image:0:200:?} will have a fixed width of 200px and variable height.

    Let me know if it works properly.

  • 249. Peter Henrichsen  |  May 19th, 2008 at 5:13 pm

    I have just implemented it! It’s really neat, and it works so fine!

    I can’t THANK YOU enough!

    This is really great for a sidebar, because it has a fixed width too!

    As it is right now, I use:


    Thanks so much, Rob, this makes my WP site much more attractive, because I missed the pictures as adds for my other posts.

    Now, It couldn’t be better!

    Best Regards Peter

  • 250. Thomas  |  May 20th, 2008 at 10:52 am

    Got a question regarding static pages.
    I’d like to use the plugin to display post, comments, pages on their own row. What parameters do I need to have only the pages displayed on one row.

    Thanks Thomas

  • 251. Rob  |  May 20th, 2008 at 11:41 am

    Thomas: The ‘show_pages’ option has three possible values: ‘false’ just shows posts; ‘true’ shows both posts and pages; and ‘but’ shows just pages. The names of the values are rather eccentric for historical reasons!

  • 252. Thomas  |  May 20th, 2008 at 12:35 pm

    ok, how could I get the 5 most recent pages. right now I get random pages

    Thanks Thomas

  • 253. Rob  |  May 20th, 2008 at 12:39 pm

    Thomas: Which plugin are you using? Recent Posts should do what you want.

  • 254. Thomas  |  May 20th, 2008 at 12:59 pm

    her is how I use it <?php recent_posts('show_pages=but')

  • 255. Rob  |  May 20th, 2008 at 4:19 pm

    Thomas: I just gave it a try and got my pages delivered in descending date order. I took a look at your own page and (according to the title attributes) the three recent pages on display are also in descending date order.

  • 256. Thomas  |  May 20th, 2008 at 4:22 pm

    Hi Rob, just one question is it the creation or the update timestamp that is used. I’d need the most recent edit version.

    I’m using a different plugin to achieve that and I’m sure I can do it with yours just don’t know how?


  • 257. Rob  |  May 20th, 2008 at 11:10 pm

    Thomas: The order is by the creation date but I’ve sent you an easy workaround.

  • 258. steve  |  May 23rd, 2008 at 3:12 am

    HI Rob,

    I have installed the posts plug in library and similar posts and added the widget to my sidebar. I’m getting “Post-Plugin Library Missing” where the posts should show up.

  • 259. Rob  |  May 23rd, 2008 at 10:18 am

    steve: All I can suggest is to make sure you have the latest versions of both plugins and to make sure they are both installed according to their instructions. If there’s still no joy please submit a bug report from the Similar Posts’ Settings screen which will help me track problems.

    BTW your site’s related posts section seems fine now.

  • 260. Richard  |  May 23rd, 2008 at 3:32 pm

    I need to show comments for PRIVATE posts (not password protected) but This won’t work.

    I checked ‘general settings>>show password protected posts’ but nothing is showing, unless I uncheck the PRIVATE setting on a post. I noticed that when all posts in a a category are checked as private, the category won’t even show in the include/exclude category list in the plugin config pages .

    Using wp-2.5.1and latest download of plugin here

    Any help much appreciated. Thanks.

  • 261. Shaun  |  May 24th, 2008 at 2:55 am

    I am trying to filter out


    using your wildcard method in the OTHER section. these comments are still showing up. Is there any other detailed instructions on how to remove them? and if possible, can it be replaced with a text string? (i.e. instead of [viddler_video] its, “Viddler Video Link – rest of comment”

  • 262. Rob  |  May 24th, 2008 at 10:09 am

    Shaun: The ‘code-tag’ filter only works with the {snippet} output tag. Is that what you are trying to do?

  • 263. Andreas  |  May 24th, 2008 at 10:38 am

    hi there, great plugins, but i have some troubleswith getting recent comments to show up the way I’d likeit to.

    I use this code:
    <li><a href="{commenturl}" title="Comment on {title}" class="commentname">{commentsnippetword:30}&hellip;</a></li>

    And it always shows the ellipsis at the end. I’d likeit to show up only on comments that goes beyond the snippet-limit.
    I get many comments that only says “Thanks!” for example and then the ellipsis isn’t needed.

  • 264. Shaun  |  May 24th, 2008 at 6:03 pm

    ROB: Thanks for your quick response. I was trying to use it with the commentexcerpt tag, however I see that its only for snippet. The snippet tag is not what I need because these video comment tags that need to be removed are from the users comments, not the post itself.

    Basically, on the site there is a right column with “Recent Comments”. I have the last 5 comments posted there using {commentexcerpt}. Some of the users post these video comments using a service called VIDLER, which in turn produces the tag [viddler_video=12345] within the comment. I want to try to remove these viddler tags and even better, to replace them with “User has posted a video comment”. Thanks for your help though, I will try to work around this.

  • 265. tim  |  May 25th, 2008 at 1:52 am

    this is a great plugin. wow! worked right away with 2.5.1. I love the customizations. Thank you so much.

  • 266. Perihelion  |  May 25th, 2008 at 3:56 am

    Thank you for your excellent plugins – all are proving most useful.

    Is it possible at all to display the output of Recent Comments within the loop or otherwise? The effect I’d like to reproduce is to display a recent comment or two (or excerpt thereof) from each post below that same post excerpt on the frontpage, an effect which seems to be popular, though for some reason difficult to accomplish (or at least find out about) in WordPress.

    An example of what I’m referring to would be Kotaku – most recent comment is displayed next to post excerpt.

  • 267. Rob  |  May 25th, 2008 at 11:27 am

    Andreas: The latest version of the Post-Plugin Library ( extends {commentsnippet}. You would probably want to use:

    Let me know how it goes.

  • 268. Rob  |  May 25th, 2008 at 11:29 am

    Perihelion: If you download the latest versions of Post-Plugin Library ( and Recent Comments ( you will find a new option to just show comments from the current post. This should let you do what you want.

  • 269. Perihelion  |  May 25th, 2008 at 1:21 pm

    THank you very much, I will try this out…

  • 270. Sansnom  |  May 25th, 2008 at 4:05 pm


    I just have updated my recent comment plugin and now my blog shows only 3 comments in the list when I ask for 30 in the admin panel… I have double checked but it seems there is a problem with updates.

  • 271. Rob  |  May 25th, 2008 at 4:45 pm

    Sansnom: Sorry. I had indeed goofed. Version of the Post-Plugin Library (just posted) should fix that.

  • 272. Perihelion  |  May 25th, 2008 at 7:30 pm

    Is just_current_post working with 2.506? I just got it working perfectly with the last one, but it broke my normal sidebar . With the new version there’s a working sidebar but just_current_post no longer works?

  • 273. Rob  |  May 25th, 2008 at 9:05 pm

    Perihelion: The reason broke your sidebar was that the plugin was permanently stuck in just_current_post mode. now seems to be working fine on my machine.

    If you have recent_comments in two places you have to use a parameter string to get them to do different things–is that relevant?

  • 274. Perihelion  |  May 25th, 2008 at 10:46 pm

    That is relevant; reading what’s written above, I can’t get it to work/don’t understand it though.

    This is my (was) working frontpage output:

    <?php recent_comments('limit=2&just_current_post&output_template=<li style="list-style-type: none">{commenterlink} commented on {commentdate:F j, Y} {commenttime:H:i}</li><li style="list-style-type: none">{commentexcerpt:35}... <a href="{commenturl}">More</a></li>'); ?>

    In addition I have a recent_comments() in a sidebar, set up with the options page.

    I’ve been messing around putting in variations of
    but I can’t get anything to work…

  • 275. Andreas  |  May 26th, 2008 at 6:19 am

    Thanks Rob. That worked perfectly. 😀

  • 276. James  |  May 26th, 2008 at 4:14 pm

    Hey there, quick question on the recent comments plugin: Anyway of removing the UL tag that it places around the comments list?


  • 277. Rob  |  May 26th, 2008 at 5:13 pm

    James: The UL tag is there by default but can easily be removed from the Settings > Recent Comments > Output screen. You can wrap the list output in anything you want or nothing at all.

  • 278. Perihelion  |  May 26th, 2008 at 7:19 pm

    Finally worked it out – now you need the just_current_post=true/false… a bit obvious in hindsight. Seems to be working perfectly now, thank you.

  • 279. Chris  |  May 29th, 2008 at 5:07 pm

    Can “recent posts” be used together with the plugin “category icons”? I would like to show a little icon in front of each post.


  • 280. Rob  |  May 29th, 2008 at 9:26 pm

    Chris: There’s probably a way … but it depends how the plugin you mention works. Any details?

  • 281. Kole  |  May 30th, 2008 at 10:37 pm

    This plugin is GREAT…but there is something that I can not do…
    I want to remove specific tag from snippet…but I do not know how to specify the tags…
    I’ve tried million times but i couldn’t get the result..
    Can anyone explain me how to do this…


  • 282. Marco Ferreira  |  May 31st, 2008 at 10:36 pm

    i’m a really bad coder, can anyone tell me how do i remove the bold in the related posts function? i mean the resulsts returned (the related posts) are in bold and i would like to remove it

  • 283. Rob  |  June 1st, 2008 at 10:42 am

    Marco Ferreira: This may be an unhelpful answer… the results returned are not — in themselves — in bold. If they show in bold on your site it is because of your theme’s style sheet.

  • 284. Marco Ferreira  |  June 1st, 2008 at 11:19 am

    yes i found it is, its defined in the css but if i change in there it will change the look of all links in all links of the site, i just wanted to change the related posts to not be bold. btw thx for the reply

  • 285. Rob  |  June 1st, 2008 at 3:27 pm

    Marco: You could wrap the similar posts output in a div and that will allow you to target the CSS just on the output.

  • 286. Marco Ferreira  |  June 1st, 2008 at 3:58 pm

    can you please give me an example, im bad at coding, and you are refering when i call the function?

  • 287. Chris  |  June 2nd, 2008 at 2:36 pm


    I want to include a category icon in fron of recent post. I’m, relying on the category icons plugin as well as your recent post plugin.

    This this the code as I imagine it. The syntax seem wrong, especially the ‘&’ seem to mess things up.

    <?php recent_posts(‘output_template={php:get_cat_icon(‘cat={categoryid}’);}{link}&trim_before=’); ?>


  • 288. Rob  |  June 3rd, 2008 at 11:19 am

    Chris: The catch is that you cannot (though it would be a good idea) use output tags inside the {php} tag. I should make that possible (which it already is for the {if} tag).

    Meanwhile you have to use the $result variable. Something like this:

    <?php recent_posts('output_template={php:
    	$categories = get_the_category($result->ID);
    	$cat = $categories[0]->term_id;
    	get_cat_icon("cat=$cat");}{link}&trim_before=’); ?>

  • 289. Chris  |  June 3rd, 2008 at 12:51 pm

    Simply beautiful!

    Together with replacing the &-sign I could even extend the parameters for the get_cat_icon.

    Great work Rob. Cheers!

  • 290. Gary  |  June 4th, 2008 at 8:34 am

    Great plug-in!

    In Recent Posts, using the widget. I would like to have the “more” text (ellipsis by default) to be a link to the post; but I don’t want to have it if there is no more to see. But of course {url} does not evaluate within {excerpt: : : }.

    Do I neeed to mess with writing php, or am I missing something?

  • 291. Rob  |  June 4th, 2008 at 11:14 am

    Gary: That’s an interesting problem! Let me think about it a bit…

  • 292. Lino  |  June 4th, 2008 at 12:06 pm

    hi, thank you for this plugin. i desire to show the post in previous page if i am in home page and then if I go to the second page I see posts of the third.
    if possible?
    thanks for all

  • 293. Rob  |  June 4th, 2008 at 2:15 pm

    Lino: I am sorry but I don’t understand. Can you also state which plugin you are talking about?

  • 294. hendra  |  June 4th, 2008 at 6:46 pm

    Great plugin. Thank you very much.

    Just advice:
    Beside “match_cat” and “match_tags”, may be you should create “match_author” too..

  • 295. Darkanima  |  June 4th, 2008 at 8:03 pm

    Hi, is there a way to have the number of characters of the title post? I need it because I show recent posts titles with a little excerpt in the footer and if the title is too long, the excerpt exceeds its space and overlaps content of the next post.

    Thanks in advance for your help.

  • 296. Gary  |  June 6th, 2008 at 3:23 am

    2 things:

    1) re “more” text being a link to the post – maybe add a boolean parameter to the {excerpt} code. Which I’m sure you would be much better at than me…

    2) For ‘recent posts’, is it possible ( or would it be a useful feature request) to have the option of making the selection using the date updated rather than date created. For me, this would be especially good for ‘pages’, which are mostly ‘static’, but do get updated sometimes and I would like that to appear in the list.

    Thanks again for a great plugin!

  • 297. Mick  |  June 6th, 2008 at 8:03 pm

    I’m using the Similar Posts plugin on my blog. I have a category of posts that I want to exclude we’ll call “Category A”. However, I want to INCLUDE Category A for posts that are OF Category A. Is this possible?

  • 298. Ade  |  June 7th, 2008 at 7:48 am

    Great plugin – thanks! Everything is working fine and it is doing exactly what I am expecting it to :-)
    Just one question, with the {link} tag I would like the alt text to be the permalink rather than the post date. Where can I alter this?
    Thanks again.

  • 299. Rob  |  June 7th, 2008 at 9:16 am

    hendra : match_authors is a good idea. Thanks.

  • 300. Rob  |  June 7th, 2008 at 9:24 am

    Darkanima: Looking at your blog I see what you mean… There isn’t a way to get the title length I’m afraid. You can however put a limit on the length of title displayed — that might help.

    The other problem is that since the font isn’t fixed width a character count would only give a rough guide. Maybe you could apply some CSS to control the overflow so it doesn’t break your layout (e.g., overflow: hidden; on the <li> might work).

  • 301. Rob  |  June 7th, 2008 at 9:41 am

    Gary: Thanks for the suggestions. The boolean parameter is a good simple idea — I was getting tangled up in whether or not to allow tags within tags!

    Your second idea is also good but might need some thinking out. Let me show my working and maybe you can help me clarify it. Currently the main thing that distinguishes the four post plugins is the sort-order. By that logic I should make another plugin ‘Recently Modified Posts’ but that feels like overkill. On the other hand I could easily make it an option for Recent Posts to choose between date and date-modified. So what about the other plugins? Do they need an equivalent choice? Random Posts and Similar Posts both order by something intrinsic to the plugin so I’d think not. Recent Comments? Maybe…

  • 302. Rob  |  June 7th, 2008 at 9:48 am

    Mick: You are making my brain hurt!!!

    OK I think I can see what you mean… but I can’t see a way to do it without some very specific recoding. Unless… I guess what you are asking for is to have the setting to match categories override the setting to exclude categories.

    Let me think about that some more…

  • 303. Rob  |  June 7th, 2008 at 9:56 am

    Ade: You can replace the {link} output tag with one built from scratch, e.g.:

    <a href="{url}" alt="{url}">{title}</a>

  • 304. Ade  |  June 7th, 2008 at 1:44 pm

    That’s great! Thatnks for that! :-)

  • 305. kairi  |  June 8th, 2008 at 2:16 pm

    thanks for the plugins
    Everything is working fine but I having problem how to sort the category….
    Do you have any parameters for it…
    I hope you know what I mean…

  • 306. jiucool  |  June 9th, 2008 at 12:01 pm

    It’s great!!Thank you for your plugins!

  • 307. Angelo  |  June 10th, 2008 at 3:34 pm

    Oops, you’re right. I didn’t see the multiple pages of options.

  • 308. Max  |  June 10th, 2008 at 9:19 pm


    great plugin, makes my blog dynamic, thanks!

    One thing I am wonderign about is how to integrate Random posts plugin with other plugins, e.g.

    other plugin is called like this –

    how to integrate it with Random Posts output template? will it look like below:

    // get category thumbnail


  • 309. archweb  |  June 10th, 2008 at 11:45 pm

    is there a chance to add pageid instead postid?

  • 310. Rob  |  June 11th, 2008 at 10:04 am

    Max: There seems to be stuff missing from your comment. I can’t tell exactly what you mean. Maybe you could ask by email?

  • 311. Rob  |  June 11th, 2008 at 10:13 am

    archweb: I believe the two are the same. WordPress stores ‘everything’ in the posts table and distinguishes them with the post_type field.

    Or am I misunderstanding you?

  • 312. archweb  |  June 11th, 2008 at 1:25 pm

    i add this line:

    it shows the last added page.

  • 313. archweb  |  June 11th, 2008 at 1:26 pm


    i add this line:
    <?php recent_posts('limit=1&show_pages=but&postid=26&output_template={title}'); ?>
    it shows the last added page.

  • 314. iamintel  |  June 11th, 2008 at 3:02 pm

    hi there
    can anyone explain to me how to use these parameter?? I kinda

    output tag(s) to sort by
    ‘true’ or ‘false’
    output tag(s) to sort by
    ‘true’ or ‘false’


  • 315. Divvy  |  June 11th, 2008 at 4:50 pm

    Thank you for the plugin. It is great!

    I have one question and I dont know if It is possible…
    Is possible to make this plugin works without the tags relating? But with posts relating?

    For example… I have 2 posts with the same tags, and they appearing like related.
    But I dont want them related…
    Is possible to choose what posts are relating? For example, puting the id´s of posts that I want in custom fields.

    Another example:
    X post with ID 49
    X post with ID 53

    On post with ID 49 I will put ID 53 in custom field and vice-versa.
    And in the end, they appear as related.

    Is possible, how? :)

    Someone understood what I am trying to say? Sorry for my poor english :)

  • 316. Rob  |  June 12th, 2008 at 10:17 am

    archweb: My guess is that the code you have there would show the specific page you ask for by ID — whether or not it is the latest.

  • 317. Rob  |  June 12th, 2008 at 10:21 am

    iamintel: My suggestion would be to first experiment with the sorting settings from the settings screen to get a sense of how they work and what output to expect.

    The parameter string arguments then correlate straightforwardly with the settings screen inputs.

  • 318. Rob  |  June 12th, 2008 at 10:31 am

    Divvy: I think I understand. You can’t do that now but it would be simple to implement and useful too. Do you think making the link by hand should just return the manual links or should it include them along with the normal automatic links?

  • 319. archweb  |  June 12th, 2008 at 5:57 pm

    rob: unfortunately it shows only recent page, not that specified with pageid=. any thoughts?

  • 320. Rob  |  June 12th, 2008 at 8:27 pm

    archweb: Try:

    <?php recent_posts('limit=1&show_pages=but&included_posts=26&output_template={title}'); ?>

  • 321. archweb  |  June 12th, 2008 at 10:00 pm

    works, thanks.

  • 322. Mike  |  June 18th, 2008 at 8:22 pm

    Great plugin! Just one problem. I’m trying to get results sorted by date – ie, with the most recent posts appearing first. Is that possible?

  • 323. Slava  |  June 18th, 2008 at 8:50 pm


    I have some problem sometimes.

    I get posts with – recent_posts(‘included_cats=433’)
    All posts are located in subcategories of 433 and at this moment I did not see any post (none found). But if I set up one of subcategories in included_cats it works ok.
    Could you please tell me why it happen and how i can fix it?

    Say again – it works ok sometimes at me and simetimes no when I set up parent category in included_cats. I need to display all posts from child subcategories.


  • 324. Shaun  |  June 19th, 2008 at 3:29 am

    Hey Rob,

    Great and useful plugin…

    I had a followup question from something I asked a few weeks ago.

    I had asked if there was any way to filter out [plugin tags] from the comments that are being shown. You had replied that I can use the {snippet} tag. However, the snippet tag is only to show a snippet of the POST itself and not a comment. Is there any way I can apply this functionality to the recent comments I am showing in my sidebar?

    basically there is a plugin I am using called VIDDLER and it produces code similar to “[VIDDLER-COMMENT=12345]” without a closing tag. Unfortunatly this is what is shown in the sidebar using your plugin. I would like to somehow make a function that would detect this [VIDDLER] tag and remove it (and possibly replace it with something else). I assume this would have to be some sort of PHP function. I am intermediately skilled in PHP so I can probably work it out but I was wondering if you had any ideas on how I can do this. Thank you so much in advance!

  • 325. Gary  |  June 19th, 2008 at 6:39 am

    Hi Rob, sorry for the delay in responding.

    Re the question of whether a new plug-in, or an option in the existing would better respond to the “date-modified’ question:

    I agree that a new plug-in is overkill.

    I think an option in both Recent Comments and Recent Posts to use date-modified is the easiest effective choice to use.

    If you wanted overkill, I could suggest a “Pages & Posts” plugin, where we could give different weights to eg recentness, updatedness, posts, pages, comments, randomness — a little like the control panel for Facebook’s news feed. Although the processing overhead might kill it…

    Hope this is useful.


  • 326. Rob  |  June 19th, 2008 at 2:20 pm

    Mike: You don’t say which plugin but they all have the option to sort the output in different ways. Should be on the plugin’s output settings screen.

  • 327. Rob  |  June 19th, 2008 at 2:38 pm

    Slava: I can’t make the problem happen on my setup. If I tell it to include a category it includes its children as well. Could you make a bug report from the plugin’s settings screen as that might help me discover what is happening?

  • 328. Rob  |  June 19th, 2008 at 2:45 pm

    Shaun: The {commentsnippet} output tag also filters for stuff like that. If you were wanting to replace rather than just delete you could use the code in output-tags.php as a guide.

  • 329. Rob  |  June 19th, 2008 at 2:49 pm

    Gary: Following our exchange I included the option to sort by date-modified in RP and RC. It’s been in the last few releases. I hope it is useful.

  • 330. Mike  |  June 20th, 2008 at 3:28 am

    Thanks again, Rob, {date:raw} what I was looking for.

  • 331. Shaun  |  June 20th, 2008 at 4:48 am

    Thanks again ROB!

    I managed to figure out the first part (filtering out the [TAG=1234])

    For those who are trying to figure out how to filter out another plugins [TAG] AND there is no closing portion try this:

    in the for the opening filter use “[TAG=.*” and then for the closing tag just use “]”.

    Now, I need to figure out how to not just delete the the tag but to replace it with some text.

  • 332. Slava  |  June 23rd, 2008 at 1:34 pm

    Hey Rob,

    as for subcategories issue – it was a problem in my DB – it was broken. Sorry for worry!


  • 333. Rob  |  June 23rd, 2008 at 2:19 pm

    Slava: Good news for me but I hope you have been able to put things right!

  • 334. Ken  |  June 24th, 2008 at 9:57 pm

    Hmm. Question — I’d love to be be able to show external trackbacks/pingbacks (that is, when another site links to mine), but not internal ones (when I link to my own prior posts).

    Does anyone know of a way to do that?

  • 335. Rob  |  June 27th, 2008 at 10:00 am

    Ken: There’s a plugin I use called No Self Pings… does that do what you want?

  • 336. Richard  |  June 28th, 2008 at 9:07 am

    When Using comment {snippet} : How do I change the truncate length of long URLs in comments? I need to make them smaller, as it breaks my theme ATM.

    Many thanks.

  • 337. Peter Lee  |  June 28th, 2008 at 9:38 am

    Hi Rob,
    I’ve just installed the similar post plug-in as well as the post plugin library (post plugin library, output text,common functions, admin subpages, admin common functions)

    I could only see 2 plugins shown in my wordpress/plugin mgmt page : similar post and post plugin library)

    I managed to activate post plugin library but the other simliar post plugin returns an error that says:
    Plugin could not be activated because it triggered a fatal error.

    Could you advise what should I do?


  • 338. Richard  |  June 28th, 2008 at 12:28 pm

    Should add … only happens on ie. FF splits URLs over lines ok

  • 339. Karl Bedford  |  June 29th, 2008 at 3:54 pm

    Related Posts is a great plugin, I wondered if there is an easy way to generating sentence aware snippets like this plugin does for ‘excerpt’ – Fancy Excerpt

    Thanks again

  • 340. Torley Lives  |  June 29th, 2008 at 6:36 pm

    Rob, lovely to see all the help you’ve given — and thanks for this plugin!

    What’s the simplest way for me to show *recently commented posts* within a particular blog post or page? Not all of them, just a single one I can continually refer back to.

    The reason is because I don’t want to clutter up my sidebars; I’ve seen how to have a list shown on the page.php or single.php templates, but that affects all pages/posts , not just one. (And of course, putting in the PHP code in WordPress’ post/page editor doesn’t work.)

    Thanks in advance!

  • 341. James  |  June 29th, 2008 at 8:54 pm

    I’ve been looking to replace Post-thumbs Revisited (which has some dire and unsupported bugs) with your excellent plugins, which I’ve already been using for some time (thank you), but I’m not sure about some of the required features.

    Is it yet possible to generate true thumbnails with the image handling, and cache them? Sending lots of large images for rescaling in the browser isn’t really an option, but there doesn’t seem to be functionality for setting resample quality, so I’m guessing it’s not in yet?

    Also, reading all the discussion above on cropping left me slightly unclear – is it actually possible to generate fixed dimension thumbnails cropped? eg. a 100*100 fixed dimension TN centers in a 200*100 image etc.

    This functionality seems relatively straightforward with image libraries (Postthumb and Nextgen demonstrate it rather well, and the speed issues go away with resample cpu quality and caching), so I wonder if you’d consider adding it at some point if not yet present – it seems by doing so you’d supercede Postthumb and offer some of the most versatile post image handling around.

  • 342. Rob  |  June 30th, 2008 at 5:34 pm

    Richard: I haven’t thought of a good way of doing that in the plugin apart from using the PHP ‘wordwrap’ function which seems like overkill.

    I wonder if, since it is an IE problem, there is a CSS workaround?

  • 343. Rob  |  June 30th, 2008 at 5:37 pm

    Peter Lee: It is right that you can only see two plugins to install. If you had problems installing Similar Posts I suggest downloading a new copy and uploading it again and re-installing. It is hard to tell without more details what could be causing the error.

  • 344. Rob  |  June 30th, 2008 at 5:49 pm

    Karl Bedford: It is certainly possible to extend the code to do that — though it can be messy dealing with the punctuation possibilities. It might find its way into a future version but no promises…

  • 345. Rob  |  June 30th, 2008 at 5:55 pm

    Torley Lives: The easiest way would be to switch on the content filter option and then put an embedded command in the post/page where you want a listing to appear. You would use <!--RecentComments-->.

    Let me know if you get it to work for you.

  • 346. Rob  |  June 30th, 2008 at 6:02 pm

    James: As it stands it isn’t possible to generate real thumbnails. I had a stab a few versions back and scrapped the idea because of server incompatibilities and speed problems (some profiling revealed it was actually quicker to download the full images rather than regenerate them as thumbnails).

    Since then, however, I’ve written the Image Shadow plugin and believe I could now make the jump to true thumbnails without a lot of trouble. Watch this space … or send me prodding emails from time to time.

  • 347. Richard  |  June 30th, 2008 at 9:31 pm

    I wonder if, since it is an IE problem, there is a CSS workaround? Possibly will be. My theme is a bit touchy with regards to overflow content, maybe that’s where I’ll look also. Thanks for the reply, Rob

  • 348. Tadd  |  June 30th, 2008 at 9:37 pm

    I gotta say .. a-freain-mazing. I was bashing my head on the wall trying to hardcode this into the template and BAM .. this plug does all I need and more. Very nice.

    Thank you so much for saving what little sanity I have left.

  • 349. Laura  |  July 2nd, 2008 at 12:04 am

    I love it! Excellent plugin.

  • 350. Rodrigo  |  July 2nd, 2008 at 1:39 pm

    In my post it is shown “Place related post plugin php here…” What do I have to do?

    Thank you

    You can see it at any post in

  • 351. Rob  |  July 2nd, 2008 at 2:14 pm

    Rodrigo: I guess, looking at your site, that you have found out how to make things work.

    Good luck!

  • 352. Torley Lives  |  July 2nd, 2008 at 7:40 pm

    Rob, thanks for the prompt help — where do I turn the content filter on? In my WordPress admin area, I went to Settings > Recent Comments > Filter and included myself (“admin”), then saved changes.

    I then inserted <!--RecentComments--> in the body of a page, but it didn’t appear to output anything visible. What am I missing here? Thanks again.

  • 353. Torley Lives  |  July 2nd, 2008 at 7:43 pm

    And this is the page I’m trying it on:

  • 354. Rob  |  July 2nd, 2008 at 9:20 pm

    Torley Lives: Instead go to the Settings > Recent Comments > Other screen where the first item should be “Replace special tags in content?”

  • 355. Torley Lives  |  July 3rd, 2008 at 4:07 am


    I’m so happy — thanks Rob, you ROCK!

  • 356. Torley Lives  |  July 3rd, 2008 at 4:09 am

    Oh, and a followup question: how do I set it so it only shows 1 comment per post of the recently commented posts?

    As in, if 10 people comment on a post, it only shows the most recent of those in the list, ignores the others. So in effect, it’s only possible for a post to appear once in the list. Thanks again. 😀

  • 357. Parth  |  July 3rd, 2008 at 5:16 pm

    I’m trying to add this into the output of the Recent Posts plugin:

    where ID is the post ID. So I did this:

    {php:the_ratings(‘div’, {postid} ); }

    but I get a parse/syntax error unexpected ‘{‘.

    Is there any way to fix this? Maybe embedding into the post content or the output?

  • 358. Parth  |  July 3rd, 2008 at 5:18 pm

    Sorry for the double post, but I missed adding

    “I’m trying to add this into the output of the Recent Posts plugin:

    ” etc..

  • 359. Rob  |  July 4th, 2008 at 10:32 am

    Torley Lives: Ah! You’ve caught me there! The architecture of the plugin doesn’t lend itself to that kind of display. Sorry.

  • 360. Rob  |  July 4th, 2008 at 10:40 am

    Parth: Your post is getting mangled somewhat so I am having to do some guessing…

    At present you cannot use output tags inside output tags (with the exception of {if}). Instead you would need to write:

    {php:the_ratings(’div’, $result->ID ); }

    Let me know whether or not it works for you.

  • 361. Torley Lives  |  July 4th, 2008 at 2:53 pm

    @Rob: Thanks for clarifying. No worries, I’m very appreciative for your help.

  • 362. Chris  |  July 4th, 2008 at 4:59 pm

    Is there a way to get the post index within the displayed list? Not the ID of the post in the DB.

  • 363. Rob  |  July 4th, 2008 at 6:16 pm

    Chris: The following snippet of PHP will do the trick:

    {php:global $c; $c++; echo $c;}

    You could always just use an ordered list too…

  • 364. moserw  |  July 6th, 2008 at 8:40 pm

    Works like a charm. Only had to color code the links to match my blog’s style and color. Thanks for sharing such a useful plugin. Much appreciated.

  • 365. Dennis  |  July 7th, 2008 at 12:23 pm

    I’d like to use an other bullet. The code I want to use: {link} ({commentcount} Kommentare)

    But it don’t work.

    Can you help me?

  • 366. Parth  |  July 7th, 2008 at 2:05 pm

    Thanks! I tried the code you gave me:

    {php:the_ratings(’div’, $result->ID ); }, but that didn’t work perfectly. There were still some uneeded things around the ratings. But to fix it I took off the apostrophes around the “div”.

    {php:the_ratings(div, $result->ID ); }, and it worked!

  • 367. Rob  |  July 7th, 2008 at 2:06 pm

    Dennis: The plugin doesn’t enforce any particular bullet — that is coming from your style sheet. You can play around with CSS and get exactly the kind of bullet you want.

  • 368. Parth  |  July 7th, 2008 at 3:28 pm

    How do I add this to the output:

    <?php if (get_post_meta($wp_query->post->ID, $example, true) != '' {
    <a href="<?php $key_name="example"; $key_value = get_post_meta($post->ID, $key_name, true); ?><?php echo $key_value; ?>" title="Click here">Link Name
    } ?>

    where the key name is $example.

  • 369. Parth  |  July 7th, 2008 at 8:35 pm

    Hey, forgot about my comment 368, I found another way that doesn’t require its use. Another issue came in the way though, whenever I post a comment on a post containing similar posts, it will post the comment on the similar post and not on the post I want it to. Somehow, the ID of the comment form changed. Is this a bug?

  • 370. Dan  |  July 8th, 2008 at 12:42 pm


    I am wondering how is it possible to format the following standard format that shows up when using “Group title template” for latest comments: “xyz commented on abc”.

    I am struggling to format that in order to have it like this:

    “Name of the post (X comments)
    user1 – comment date
    user2 – comment date

    Thanks in advance.

  • 371. Dan  |  July 8th, 2008 at 1:02 pm

    Nevermind I figured it out.
    You have to have this in the output template field:

    {commenter} on {date}

    This is a custom code so go ahead and play with it.

    This plugin rocks !

  • 372. Mikael Boldt  |  July 8th, 2008 at 4:25 pm

    I have a wordpress 2.5.1 blog where I’m using the built in gallery.
    How do I get the comments to images in the Recent-Comment list?

    kind regards


  • 373. Rob  |  July 10th, 2008 at 10:24 am

    Parth: That does sound like a bug! I can’t reproduce it here though so it might come from a strange interaction between plugins or with your theme. Maybe you could give me more information via a bug report from the plugin’s settings screen.

  • 374. Rob  |  July 10th, 2008 at 10:37 am

    Dan: Good luck!

  • 375. Rob  |  July 10th, 2008 at 10:38 am

    Mikael Boldt: Forgive me if I am being dense but I don’t understand what you want to do. Can you give me some more detail?

  • 376. Mikael Boldt  |  July 10th, 2008 at 10:52 am

    Take a look at:

    Sorry my Page is in Danish

    Below the images you will see a line “Kommentarer” (comment)
    and a text: “Hi Rob” this is a comment I have made today, so it should be on top of my list “Seneste Kommentarer” ( Recent Comments) further down on the page in the left column.

    The comment is made to an image in the new built-in [gallery] for WP2.5.1

    Do you see the problem?

    Mikael Boldt

  • 377. Rob  |  July 10th, 2008 at 2:37 pm

    Mikael Boldt: I think I understand! Attachments are new territory for me — I have always tended to ignore them. As it stands the plugin ignores attachments but it should be an easy change to make to give the option of including them. Watch for an update.

  • 378. Matt  |  July 11th, 2008 at 9:24 pm

    I am trying to have the recent posts author name as a link to the authors profile page. Tried using the {php:code} feature with no success. Ideally I would like to use the function the_author_posts_link.

    Any help is appreciated!

  • 379. Rob  |  July 12th, 2008 at 5:25 pm

    Matt: It will see if I can produce a new tag to give the url to the author’s archive.

  • 380. Rob  |  July 12th, 2008 at 5:33 pm

    Matt: Type the following code into the output_tags.php file and the tag {authorurl} will work for you:

    function otf_authorurl($option_key, $result, $ext) {
    	return get_author_posts_url($result->post_author);

  • 381. Rob  |  July 12th, 2008 at 10:25 pm

    Matt: Version includes the {authorurl} output tag.

  • 382. Rob  |  July 12th, 2008 at 10:32 pm

    Mikael Boldt: Version adds the option to include attachments.

  • 383. Jason Sandquist  |  July 13th, 2008 at 7:22 pm

    I am new to all this. I have both the post library plugin and similar post plugin activated and it is not showing up. Any suggestions?

  • 384. Rob  |  July 13th, 2008 at 9:40 pm

    Jason: Just installing the plugin won’t do anything. You have to deploy it in some way. There are three ways to get a listing: a) use the widgets settings screen to put the Similar Posts widget in a sidebar; b) put a line into your theme code somewhere appropriate (the plugin page has some help on that; or c) embed a tag in one or more pages or posts <!--SimilarPosts--> to get the listing in a specific place.

    If you have done one of the above and you still get no listing I suggest you visit the Similar Posts settings screen and make a bug report — that gives me some extra information to help track down problems.

    Good luck!

  • 385. Pierrot  |  July 14th, 2008 at 5:13 am

    Hi Rob,

    Fantastic plugin! I use it on under Artists with no problems.

    I’m trying to get it working with images on another site…

    I’d like 3 small thumbs, about 150 px in width to appear under each image on the front page. The site is very simple and has no text. There is only an image or a video for each post. All of the site navigation is done through a tag cloud in the sidebar. The categories are limited to Cartoons, Videos or Images.

    I came up with this code as per your image instruction…


    I’ve entered the code in the index.php file and have the plugin setting to be as wide as possible.

    What am I doing wrong?


  • 386. Michael  |  July 14th, 2008 at 6:56 pm

    Ok. I’m lost. I installed the plugin and the library. I configured the options. But – now what? Were does the list of similar posts actually appear? Advice please…


  • 387. Rob  |  July 14th, 2008 at 9:52 pm

    Pierrot: Try ‘0’ instead of ‘1’ to get the first image in a post (darn programmers!), i.e.:


  • 388. Rob  |  July 14th, 2008 at 9:57 pm

    Michael: Where do you want the list to appear? If you tell me I can give you some advice on getting it to happen.

  • 389. ali  |  July 14th, 2008 at 11:15 pm

    hey is this meant to go only in posts, can it be in index.php of the theme?

  • 390. Michael  |  July 15th, 2008 at 12:28 am


    I’d like them to appear below each post.

    Appreciate the help!


  • 391. Benjamin  |  July 15th, 2008 at 6:35 am

    I’m sure I’m being a dunderhead here but here’s my issue anyway. I’ve installed and activated the pluging and now it’s say that the table wp_similar_post doesn’t exist. Do I need to manually run a sql script on my db to get it to go or did I do something wrong in the install? WP version 2.6 and mqsql is the database.


  • 392. Rob  |  July 15th, 2008 at 11:16 am

    ali: Yes you can insert a call to the plugin in any of your theme files.

  • 393. Rob  |  July 15th, 2008 at 11:19 am

    Michael: The particulars depend upon your theme but in general what you probably need to do is open up the theme’s ‘single.php’ file and figure out where exactly you want the listing. Then add the code:

    <?php similar_posts(); ?>

    Let me know if that works/makes sense.

  • 394. Rob  |  July 15th, 2008 at 11:30 am

    Benjamin: I doubt you are a dunderhead! My first line of advice would be to suggest you remove the similar-posts folder and then upload a new copy and try to install again. If that doesn’t work get back to me.

  • 395. Michael  |  July 15th, 2008 at 11:37 am


    I was afraid you were going to say that. I tried putting the “similar_posts” code into a few places in my ‘single.php’ file and nothing happened. Does the plugin work on existing posts, or just on new ones? I didn’t see a list of related posts after inserting the code and going back to my website.


  • 396. Rob  |  July 15th, 2008 at 2:47 pm

    Michael: The good news is that, from inspecting the page source, the plugin is actually operating (it produces a comment with a timing message) — now all we have to figure out is why there’s no output!

    Can you go to the Settings > Similar Posts screen and send me a bug report from there? It will tell me all the options you have set and help me find out what is happening.

  • 397. Benjamin  |  July 15th, 2008 at 4:03 pm

    Hi Rob,

    Tried that and still nothing. I tried manually creating the table and now I’m getting a load of duplicate entry errors. Not really sure where to go from here, any ideas?

  • 398. Mikael Boldt  |  July 16th, 2008 at 6:23 am

    “382. Rob | July 12th, 2008 at 10:32 pm

    Mikael Boldt: Version adds the option to include attachments.”

    I’m sorry, it is not working with comments on images in [gallery]
    Maybe, it is because the post_status is “inherit” and not “publish”

    my settings
    Show attachments? yes
    Display posts that are: 4*yes


  • 399. Rob  |  July 16th, 2008 at 11:13 am

    Mikael Boldt: Well spotted! I am sure that is the problem and I’ll fix it shortly.

  • 400. Rob  |  July 16th, 2008 at 11:16 am

    Benjamin: Let me try installing the plugin on a virgin-install of 2.6 and I’ll get back to you.

  • 401. Rob  |  July 16th, 2008 at 11:25 am

    Benjamin: I just checked that Similar Posts installs fine on a new install of WordPress 2.6. You haven’t mentioned it so let me ask just in case: did you first install the required Post-Plugin Library?

  • 402. Kenneth Dreyer  |  July 16th, 2008 at 3:09 pm

    Hi, Im trying to get this plugin to work with WordPress MU, but It doesnt.. hehe! When the plugin is unactivated it produces an error, but when its activated it doens’t give my anything. Just blank.

    I did of course install the post-plugin library first! Any idea what might be wrong?

  • 403. Benjamin  |  July 16th, 2008 at 3:26 pm

    Hi Rob,

    Yes, I did install the post-plugin library, first as the instructions detail.

  • 404. Rob  |  July 16th, 2008 at 3:44 pm

    Mikael Boldt: Version (just posted) should fix the attachments issue.

  • 405. Mikael Boldt  |  July 16th, 2008 at 6:06 pm is working
    Thank you very much

  • 406. Malcolm  |  July 16th, 2008 at 10:30 pm

    I am having the exact same problem as Benjamin, except I am still running WP 3.2.2. After activating the plugin, I am getting an sql error on the single post page…because for some reason, the tables didn’t get added to the DB.

    I, also, am feeling like a dunderhead.

  • 407. Rob  |  July 17th, 2008 at 10:53 am

    Benjamin: There’s a flurry of installation problems being reported in the Similar Posts comments. I guess the cause will relate to yours too. Detective work ahead!

  • 408. Rob  |  July 17th, 2008 at 10:54 am

    Everyone: This sudden flurry of installation problems are presumably all related. I haven’t tracked down the cause yet but you could all help me by sending in a bug report from the plugin’s settings screen. I might be able to see a common pattern.

    Thanks for your patience and help.

  • 409. Kenneth Dreyer  |  July 17th, 2008 at 11:05 am

    How about compability with WordPress MU ? :)

  • 410. Rob  |  July 17th, 2008 at 11:41 am

    Kenneth: Similar Posts is working fine with WPMU 1.5.1 here. I am trying to get the latest version but the servers are unavailable right now. What version are you using?

  • 411. Kenneth Dreyer  |  July 17th, 2008 at 11:51 am

    Im using the latest version, which was downloaded two days ago. hmm.. I think were using the same version then! Wierd, it doesn’t produce any error messages, neither does it work!

  • 412. Rob  |  July 17th, 2008 at 12:07 pm

    Kenneth Dreyer: It may be related to the other issue, whatever it is, that seems to be causing problems.

    I know very little about MU except to have a test rig running to check compatibility.

    Watch this space.

  • 413. Kenneth Dreyer  |  July 17th, 2008 at 12:25 pm

    I will! Thanks for being so helpful..

  • 414. Rob  |  July 17th, 2008 at 5:11 pm

    NB: I believe I have found the cause of the installation problems — related to WP 2.6’s capacity to relocate the content folder — and, if I am right, version should fix things.

  • 415. Michael Benson  |  July 21st, 2008 at 9:26 pm

    I am currently using the plugin Get-A-Post directly above where my Similar Posts are being placed, I am assuming the Get-A-Post plugin is using a wp_Query to extract the relevant information; as stated in your FAQ this will whack the Similar Posts out of context, and now all that is displayed are the same posts. Is there any way around this situation aside from placing the Similar Posts code above that of the Get-A-Post plugin, since this doesn’t work well for design reasons?


  • 416. Rob  |  July 22nd, 2008 at 10:39 am

    Michael Benson: Similar Posts tries it’s best to get to the original query but sometimes it can’t. You could try calling wp_reset_query() after Get-A-Post — it might make a difference — or you could maybe put Similar Posts after the post content.

  • 417. Kjetil  |  July 27th, 2008 at 10:55 pm

    I’m using the K2 theme and try to figure out where I should insert the code to make this plugin work.
    I’ve read Lorelles nice article and tried to insert the code different places in the single, page and index files but honestly (and as you understand) I’m lost.
    Any hints on where to try?
    (The K2 theme (RC6) is built a bit different than most other themes, I believe – with the loop in a separate file)

  • 418. Kjetil  |  July 27th, 2008 at 10:58 pm

    The code fell out and so did the plugin name – its the Random posts plugin.
    Would be very nice to get it up and running.
    Thanks for making it!

  • 419. Jeff  |  July 30th, 2008 at 4:16 am

    Rob, I noticed a comment or two about Gravatars — I’m using WP 2.6 and having no luck getting them to show up. I’ve tried simply {gravatar} and {gravatar:30:G:identicon}. Is this compatible with 2.6’s standard implementation of avatars? Thanks!

  • 420. Jeff  |  July 30th, 2008 at 1:02 pm

    Sorry, Rob — I just notice this morning that they’re appearing in the upper right-hand corner of my page! No problem; I think I can take it from here. Sorry. :-)

  • 421. Rob  |  July 30th, 2008 at 4:34 pm

    Jeff: Glad to hear you solved your own problem!

  • 422. Rob  |  July 30th, 2008 at 4:37 pm

    Kjetil: I don’t know anything about K2 but I’ll take a look and let you know.

  • 423. Rob  |  July 30th, 2008 at 4:57 pm

    Kjetil: K2 seems to have many different ways of operation that it all depends how you are using it. You can use Random Posts as a widget or you should be able to insert the template tag in either theloop.php or sidebar.php.

    You might get better advice at the K2 forums!

  • 424. Jeff  |  July 30th, 2008 at 7:46 pm

    Hi, Rob — back again with a small question. I notice everyone puts “…” right in their code after a {commentexcerpt:20} or whatever — is there a way to allow for a comment that is *less* than the value specified? In other words, if the comment is so small that {commentexcerpt} displays the whole thing, is there a way to switch “…” on and off?

  • 425. Celso  |  July 30th, 2008 at 7:47 pm

    Hello, I have more than 200 posts e the plugin show nothing at all. I would appreciate any suggestions.

    Thank you.

  • 426. Rob  |  July 30th, 2008 at 9:24 pm

    Jeff: I believe that {commentexcerpt:20:b:…} will only show the ellipsis when the comment excerpt is truncated. Include an extra parameter ‘link’ and the ellipsis will link to the full comment.

  • 427. Rob  |  July 30th, 2008 at 9:25 pm

    Celso: It’s hard to diagnose without any details… can you make a bug report from the plugin’s settings screen and that will give me some extra information?

  • 428. Jeff  |  July 30th, 2008 at 9:43 pm

    Awesome! Thanks, Rob. That works perfectly!

  • 429. James G  |  July 31st, 2008 at 1:27 pm

    Great plugin and great (and patient) support provided.

    Keep up the good work!

  • 430. Rool  |  August 3rd, 2008 at 7:31 pm

    Hi Rob,

    Thank you for your help. Now i have another issue. I want to place a category icon before every recent news aricle. Now i found this code on a earlier comment:

    $cat = $categories[0]->term_id;
    get_cat_icon(“cat=$cat”);}{link}&trim_before=’); ?>

    But where to i have to place this code? I can’t figure it out.

  • 431. Rob  |  August 3rd, 2008 at 9:29 pm

    Rool: You would place suitable code as part of the output template using the {php} tag to run some code, e.g.


    I don’t have the category icon plugin so the above is untested — if it fails try putting single quotes around the {categoryid} tag.

    Let me know how it goes.

  • 432. Rool  |  August 3rd, 2008 at 10:07 pm

    Thank you for your help

    I’ve tested it with double and single quotes but i get this message:

    Parse error: syntax error, unexpected $end in /usr/home/boelie/domains/ : eval()’d code on line 2

  • 433. Rob  |  August 4th, 2008 at 10:16 am

    Rool: I can see I didn’t terminate the bit of php code with a semicolon:


    Again I’m not sure about whether the category plugin wants single quotes around {categoryid}.

  • 434. Vex  |  August 4th, 2008 at 1:59 pm

    Hi. I am interestedin your Comment plugin/widget.

    One option I am really keen tofind is a scrollable display.

    This way I can allocate some page realestate and allow the users to view a moving scroll list. Ideally it would have the option to manually/click through or reverse the list.

    Thanks in advance

  • 435. Rool  |  August 4th, 2008 at 10:12 pm

    Hi Rob,

    It works now with the single quote. There’s only a red border arround the icon. Is that from your plugin or from the icons plugin?

    Thank you very much for your help

  • 436. Rob  |  August 5th, 2008 at 8:49 am

    Vex: The post plugins focus on the content side of things–how they appear is basically up to the CSS that is in force.

    There are a number of ways to get a scrolling display, one that comes to mind is to give the enclosing element a width and height and make overflow auto.

    An alternative would be to generate the plugin output as a SELECT element with however many items set to display.

  • 437. Rob  |  August 5th, 2008 at 9:03 am

    Rool: My guess would be neither! It may be down to the icons plugin but is more likely just an artefact of browser and CSS. I’d have a look at the HTML of the page and see exactly what is styling the icon and then tweak your CSS.

  • 438. spcaer  |  August 6th, 2008 at 4:48 am

    hello, I am trying to add multiple instances of this to one page. For instance, I want to show the 3 most recent comments for each of my two categories in two different places on the index page of my site. How is this accomplished?

    Thanks for the great plug-in!

  • 439. Rob  |  August 6th, 2008 at 3:38 pm

    spcaer: Use the settings screens to set the options which both appearances of the output will share. Then pass the different settings via the parameter string.


    <?php recent_comments('included_cats=13'); ?>

    in one place and

    <?php recent_comments('included_cats=17'); ?>

    in another.

  • 440. Steven  |  August 9th, 2008 at 6:54 pm

    Hi Rob

    I’m using a bulleted list with images for the similar posts but can’t find away to prevent the widget title from being part of the list. Basically my arrow.gif image appears to the left of “Similar Posts” heading as well as the links. I’m trying to ‘break’ the widget title out of the list. Example… currently I have this:

    > Similar Posts
    > Post title link 1
    > Post title link 2

    I’m trying to do something simple i.e.

    Similar Posts
    > Post title link 1
    > Post title link 2

    I’ve played around with my css and looked closely in the output_tags.php page but to no avail.

    Any ideas would be much appreciated, assuming it’s even possible..


  • 441. Jesper  |  August 9th, 2008 at 10:23 pm

    I dont understand anything at all, it i use this in the template:


    That doesnt work at all

  • 442. Rob  |  August 10th, 2008 at 8:23 am

    Jesper: You would get nothing if you used exactly that template tag because ‘maxwords’, ‘method’, ‘more’, and ‘link’ are meant to be optional parameters which you replace with values as necessary. For example {excerpt} will produce the default excerpt but {excerpt:50} will make the excerpt 50 words long. ‘Method’ if you use it can be ‘a’ or ‘b’, giving different kinds of excerpt. ‘More’ lets you specify what to use to indicate the excerpt has been truncated — it only has an effect if ‘method’ is ‘b’.

    Do you get the idea?

  • 443. Rob  |  August 10th, 2008 at 8:40 am

    Steven: It is hard to diagnose your problem without seeing the source. If I take a blank install and just put the Similar Posts widget in the sidebar the HTML produced is like this:

    <h2>Similar Posts</h2>

    That is with a (ridiculous) output template of <li>...</li>. As you can see the widget title is outside the list so you should be able to style it the way you want.

    To be of more help you would need to send me the plugin’s settings — you could send a bug report to do that automatically.

  • 444. jack  |  August 12th, 2008 at 6:11 pm

    I’m using the plugin on this site:

    In the sidebar on the right I used the widget, including future posts, both pages and posts and only exluded one category (the two features on top of the page). Except the pages and the news category, almost all posts are future posts (published!).

    Now there are two comments shown in the sidebar (comments on pages), but there are actually four until now (it’s a site about a festival in october), including two on a future post which is already published. These two are not shown and I guess no other comments will be shown until I know why this is happening.

    Any ideas?

  • 445. Steven  |  August 12th, 2008 at 8:43 pm

    Hi Rob

    You were right, I had to look a closer at my theme and plugin settings. I’m using Brian Gardner’s Revolution Magazine theme and had to change the class value in wp-includes/widgets.php

    		'before_widget' => '<li id="%1$s" class="r_sidebar">',
    		'after_widget' => "</li>\n",
    		'before_title' => '<h2>',
    		'after_title' => "</h2>\n",

    Previously it has been…

    		'before_widget' => '<li id="%1$s" class="widget %2$s">',

    and I had no such class defined in my style sheet. Just didn’t expect it to be hard coded into the widgets.php file.

    Thanks in any case,

  • 446. Rob  |  August 13th, 2008 at 2:55 pm

    Jack: I’ve responded to your comment on the Recent Comments page.

  • 447. Rob  |  August 13th, 2008 at 3:01 pm

    Steven: I’m glad you got it sorted out. Widget problems are always hard to debug at a distance.

  • 448. JK  |  August 18th, 2008 at 2:35 am

    Hi, I just downloaded post-plugin library and random-post plugin today. I’m just struck with the output settings option. Could you please help me with the command that I need to put in “Output Setting” option?

    Currently I have this:


    This works ok however the problem is that when it takes the first image from the post, it pulls all other “style” attributes with the image which causes my random post images look awkward without proper alignment. How do I remove the style property in the random post images?

    Could you please tell me to display the random posts like this site? And what command (Output settings) should I use to produce the same output?

    (Please look at the top left 1st widget – it is using your plugin – I want exactly the same output – 2 rows, 3 posts per row).

    Your answer will help a lot of people who are new to this plugin.

    Thanks a lot.

  • 449. JK  |  August 18th, 2008 at 2:37 am

    Continuing from previous comment:

    Currently I have:


    Somehow the previous comment ignored it.

  • 450. David Putnam  |  August 18th, 2008 at 5:35 am

    Hello Rob, we are attempting to use your plug-in to expose Related Posts on the Artile Pages of our blog, GetWithGreen[dot]com. We are running into an issue that I hope you can help with. Please.

    Right now the plug-in is not pulling content related to the main post on our Article Page, but rather is pulling content related to another module in the sidebar of our page (module called Featured Articles).

    We want your plug-in to pull content related to the primary post, not this little module in our sidebar. Any suggestions. Thanks so much for any help you can provide!!!


  • 451. Rob  |  August 18th, 2008 at 10:29 am

    JK: I suspect the best answer to both parts of your question lies in CSS.

    Probably the best way to ‘get rid’ of the styling in the thumbnails is to override it by a more specific style definition. For example, if your images are coming over with a messy extra class you can redefine that class for your situation. Let’s say it’s an unordered list:

    ul img.messyclass: {…}

    I’m not sure I’m making myself clear so get back to me if not.

    The nicely styled block from applepiepatispate isn’t that complicated in code — if you view the source it’s just a bunch of linked images produced by an output template like the one you are playing with. How it actually looks on the page is all a matter of CSS styling. You could experiment with floating the images left or you could contact the page owner and see if Jude is willing to give you some hints.

    Either way … good luck!

  • 452. Rob  |  August 18th, 2008 at 10:42 am

    David Putnam: This is problem in many situations. Similar Posts has to know what the ID of the current post is. In simple cases it is just a matter of looking at the global variable $post and checking its ID. Unfortunately, many widgets and plugins perform actions that corrupt the value of $post — even though strictly they should clean up after themselves. Similar Post tries a few more convoluted methods to find the ID but is still defeated under some circumstances.

    One workaround is to reorder your widgets to place Similar Posts before the corruption occurs — but that might not be practical for design purposes. Another option is to choose other, better behaved widgets to do the job of the ones which are causing the issue — but again that might not be possible.

    One way — if you are not averse to some coding — is to capture the value of the principal posts ID right after it is displayed:

    $my_post_ID = $post->ID;

    and then force the ID value just before Similar Posts does its stuff:

    $post->ID = $my_post_ID ;

    I can probably make that a bit a bit more automatic, now I think about it, and will see if I can sneak it into the release which is waiting in the wings.

    Thanks for stimulating an idea.

  • 453. mike  |  August 18th, 2008 at 3:23 pm

    Tanks rob for you interesting plugin, but in fact 1 feature missing me =) .

    Because I’m using wordpress for DJing event I need to publish in recent post something like “next 5” event.
    But I have published lots of event in the future. And using “the futur is now plugin” to have them displayed, and by this way I have no futur post, and all published.

    I need something like “newer” instead “old” in the “Ignore posts” configuration to do the trick to have, from today, the X next Gig.

    What are you thinking about the possible to add this feature in the next version ?

  • 454. Rob  |  August 18th, 2008 at 6:03 pm

    mike: Thanks for the suggestion. What I’ll do is look into the plugin you mention and see if I can work with it.

  • 455. Dickson  |  August 18th, 2008 at 6:12 pm

    Hi, how can i make similiar post to display the related post on the posts itself and not widget? what are the exactly things i have to do or modify?

  • 456. Rob  |  August 19th, 2008 at 10:01 am

    Dickson: Is it misbehaving? Have a look at the explanation above. I have made some changes to the next release which will make it easier to force recognition of the current post when the automatic mechanism fails.

  • 457. Simon  |  August 22nd, 2008 at 7:33 am

    Hi Rob,

    This sounds simple but I can’t find a solution. All I want to do is get an excerpt up until the first paragraph break (first sentence).

    Is this possible with your existing syntax or do I need to create a custom function?


  • 458. Rob  |  August 22nd, 2008 at 8:49 am

    Simon: Sometime ago I removed the ability for snippets and excerpts to be truncated by sentence–for the life of me I can’t remember why!–but enough people have requested it back to make me look into replacing it!

    In the meantime, I can offer you truncation at the <!--more--> marker which is what WordPress does.

  • 459. Robert@PNG  |  August 23rd, 2008 at 12:13 am


    I’m already using a couple of your plugins and would like to start using the Similar Posts plugin.

    I would like to have a Similar Posts section at the end of every post and although I know that it would just be a matter of adding: somewhere within the WP loop or within the Single template (depending on theme). The fact is that I don’t really want to have to fiddle with PHP or CSS.

    Do you have any plans of adding an option that will allow us just to tick a box to automatically include say a Similar Posts section at the end of every post?

    Note that I have been testing a plugin called: “Add footer plugin” but it does not appear to allow execution of PHP code within it’s options fields.

    Any suggestions or tips on how I can go about doing what I want to do will be greatly appreciated.



  • 460. Rob  |  August 23rd, 2008 at 8:20 am

    Robert@PNG: It would be very easy to implement as an option automatically adding Similar Posts to the end of every post but I have been loath to do so for two reasons. First, because it would add the overhead of yet another scan through post content and second, because the territory at the end of a post is contested — there are any number of different ways that people fill it and there is no convention about what comes first or how to sort that out.

    Now maybe the overhead issue is more in my head than real (like so many things! and maybe, if I read around, I will find the battle for the end of post is easily managed. Convince me! In the meantime I recommend using Urban Giraffe’s sniplets plugin which lets you automatically place output at the end of posts and all sorts of other places.

  • 461. Rob  |  August 24th, 2008 at 8:31 am

    Simon: The next release should have the ability to restrict excerpts to a chosen number of whole sentences. Thanks for the inspiration.

  • 462. Jazykové pobyty  |  August 24th, 2008 at 3:19 pm

    Hello, thanks for your great plugin. How can I delete time in title when posts are shown?

  • 463. Rob  |  August 24th, 2008 at 5:27 pm

    Jazykové pobyty: You don’t have to use the default {link} output tag — you can build your own, e.g.:

    <a href="{url}">{title}</a>

    Does that make sense or am I misunderstanding your question?

  • 464. jeferson dos Santos  |  August 25th, 2008 at 1:13 am

    Is possible insert “similar posts” directly on bottom of posts, manually or automatically?

    Sorry my English…


  • 465. Rob  |  August 25th, 2008 at 2:05 pm

    jeferson dos Santos: The next release (out shortly) will support automatic placement.

    You can also manually insert the template tag, similar_posts(), in your theme files to get output anywhere you want it.

  • 466. Robert@PNG  |  August 30th, 2008 at 9:05 pm

    Hi Rob,

    Thanks for your response to my query from 23/8 re placement of tag in post footer and the suggestion to use Sniplets Plugin.

    It works great!

    Noticed a later comment that you will be including this function within a future release. Looking forward to it.

    Thanks a mil!


  • 467. Henk  |  August 30th, 2008 at 11:40 pm


    this seems like exactly what i am looking for! I did read the pages but dont completely understand it.

    Can I just show random post (full posts no links) instead of the normal posting by wordpress by date? So that when a user go to my blog he just see a random order of all my posts?

    thank you so much!


  • 468. Rob  |  September 1st, 2008 at 7:52 am

    Robert@PNG: The functionality is in place on my test site and just needs refining a little before release. Soon!

  • 469. Rob  |  September 1st, 2008 at 7:56 am

    Henk: You could use Random Posts that way but it isn’t exactly what it was designed for!

    You would have to put a call to the plugin in your theme’s index.php file, effectively replacing the WordPress ‘loop’. You would then use the settings page to create an output template that gave you the title, full post, etc.

    It should work.

  • 470. Martin Ackerfors  |  September 2nd, 2008 at 9:28 am


    I’m using your excellent plugins with utmost satisfaction. I do have a question about recent comments.

    The thing is: I want recent comments to be displayed as they are at my blog with one exception, I just want the latest comment on each post to be displayed. Is it possible? If so – how? I read through this page without really knowing what I was looking for and I don’t know any php to do it myself. :-)


  • 471. Rob  |  September 2nd, 2008 at 10:22 pm

    Martin Ackerfors: I’m afraid the plugin doesn’t do that. One day soon I must look into finding an efficient way to achieve that.

  • 472. Beni  |  September 3rd, 2008 at 6:22 pm

    Awesome Plugin, Thank you very much! :)

  • 473. Alex  |  September 4th, 2008 at 11:25 am


    I am trying to output different text after the 5th recent post. If I have 10-15 in total is there any way I can get something to show between post 5 and 6 ?


  • 474. Rob  |  September 4th, 2008 at 2:36 pm

    Alex: There isn’t a direct way of doing what you want but there is a kludgey workaround: call recent_posts two times and the second time use a parameter string to tell it to skip the first 5 posts.

  • 475. Steve  |  September 5th, 2008 at 3:16 am

    I could use some help. Using the recent posts plug in. I’m setting up a section on the blog that is for Upcoming Events (at

    For posts that I want listed here, I ensure one of the categories is Events, and I add two Custom Fields – event_end_date and event_start_date. I’m using the format yyymmdd.

    I only want to display the events that have not ended yet, with the next event at the top of the list. But…

    For sort output by – I’m using the event_start_date.

    I’m also filtering to show only – in this example – posts 35,64,67.

    It does not seem like the sort output order is working.

    Would someone be willing to take a look and let me know if I should be approaching this a different way?


  • 476. Rob  |  September 5th, 2008 at 8:15 am

    Steve: Hi! Maybe you could send the actual options since I’m not very clear on the detail of what you mean in some of the phrases above. It sounds like an interesting problem!

  • 477. Mellie  |  September 5th, 2008 at 9:08 pm

    Hi, I just installed your latest similar post plugin but it doesn´t seem to work. No similar posts is shown at all and I am at lost. Can you pls help? Thanks in advance,

  • 478. Rob  |  September 5th, 2008 at 11:02 pm

    Mellie: Could you send a bug report from the similar posts settings screen? That will give me a little more idea what might be the problem. Can you also tell me how you are invoking the plugin?


  • 479. gw468  |  September 6th, 2008 at 7:50 am

    Great Plugin!!! I’m trying to replace the default archive page with the output of this plugin. I’ve got it tweaked pretty much the way I want except for a couple of things.

    1. Before, I was using the “Evermore” plugin to truncate my post at the end of a paragraph rather than in the middle of a sentance. Is it possible to have that type of feature with this plugin?

    2. If I can’t have #1, what about this… I’m using {excerpt:75:b:Read More:link} and I’ve altered the library page so that my “more” link is inside a div, floated right and styled to look like a button. How could I put … at the very end of the last word, before the end “p” tag before the “more” link?

    3. Currently, using this in archive.php is useless because if I’m in a parent category or a child category, it outputs the same. Is there a way to have it only output posts from the currently selected category and it’s children only?

  • 480. Mellie  |  September 6th, 2008 at 1:57 pm

    Hiya Rob,

    this might sound silly, but how do I look for the bug report? I invoked the plugin by placing this code …. in the single.php.


  • 481. steve  |  September 7th, 2008 at 12:48 am

    Can you be more specific as to what would help you? All of the settings that I\’m using are listed above.

    (Note that your contact form is throwing an error for me.)

    Under Design > Widgets, I\’ve got the Recent Posts widgets in the side bar and the title is Upcoming Events. Showing 5 posts.

    When I create a post, I add two custom fields, one called event_start_date and the other event_end_date. The format for each is yyyymmdd – to help with sort order. As an example event_start_date 20080901 and event_end_date = 20080909.

    Under Settings > Recent Posts > Output, I have the \”Sort Output By:\” set to event_start_date (ascending). Output template is just the headline with a link to the full post ({link}).

    Under Filter, for Posts to include, I have listed the three events that I want to display. Just using post numbers with commas. Currently it is 64,67,35

    For Categories to exclude/include:, I am including the Events category and the news category since some are associated to both categories.

    That\’s the set up – I\’d be happy to provide you with access if you\’d like to look.

    – MY GOAL –
    All posts that are in category \”events\” that are happening in the future – as defined by event_end_date – show up in this Upcoming Events section.

    They should display with the next event at the top of the list – as defined by the event_start_date.

    It would be nice not to have to define the posts I want in the category. It would be nice that when the event ends, it drops out of the list.

    Does that make sense?

  • 482. Saeid  |  September 8th, 2008 at 3:18 am

    Hi there,
    very good job.
    I have used your plugin every where on my news blog site.
    It was like tailor made for me.
    But unfortunately all my post used RECENT POSTS plugin save values and parameters of the first post of the page.
    E.g. BOOKMARKING plugin use overall the same permalink.
    I have used the code:
    <?php if (function_exists(\’recent_posts\’)) { recent_posts(\’limit=1&included_cats=1677&output_template={title}{excerpt:100:b:more:link}\’); } ?>
    For more please check my Site to see what I mean.
    Maybe I am using the wrong code if so please tell me which combination of code suit best to my scheme.

    Thanks in advance, Saeid

  • 483. Rob  |  September 8th, 2008 at 12:29 pm

    gw468: The soon-to-be-released next version of the plugins lets you choose to restrict the excerpt to a number of whole sentences … I hope that will serve to answer your first two points.

    To solve your third issue I think you will have to use some PHP in your archive file to discover what category you are ‘in’ and then pass that in a parameter string to the plugin, e.g. ‘included_cats=$cat’. Make sense?

  • 484. Rob  |  September 8th, 2008 at 12:32 pm

    Mellie: I’m afraid the comment box ate your code so I am none the wiser!

    You send a bug report by looking under settings/options for the Similar Posts menu. You should see a submenu entitled ‘Report a Bug’. Click there and follow the instructions. Thanks.

  • 485. Rob  |  September 8th, 2008 at 12:33 pm

    steve: My brain is cramping as I try to understand your setup in the abstract. Let me see if I can duplicate it on my test server and I’ll get back to you.

  • 486. Rob  |  September 8th, 2008 at 1:30 pm

    Saeid: I am sorry but I don’t quite understand. Can you explain it to me very simply?

  • 487. Rob  |  September 8th, 2008 at 2:18 pm

    Steve: If I use


    to sort the output it kind of works the way you want but there are caveats.

    First is that though the five items are listed properly by event start date which actual posts get pulled from the database depends on the post’s publication date. I mean that a new post for a far future event could push out older posts for closer events. A possible solution would be to use the start date (in the future) as the post’s date and then specify that you want to show only future posts in the recent post listing. The catch would be that posts would cease to be marked as future once their start date is reached rather than their end date.

    You could fiddle with the PHP code of the plugin to select and order posts by event_start_date and use the end date as the (future) date of the post and show future. The modification shouldn’t be hard but it would be specific to your need.

  • 488. Saeid  |  September 8th, 2008 at 6:52 pm

    Rob: Sorry for my bad English.
    I use \”Odiogo\” and \”Share/Save Buttons\” Plugins within my wordpress blog on every post.
    If you click for example the \”Listen now\” button above the sidebar post, it reads the wrong text namly the very first text of the page.
    The same occurs to \”Share/Save Buttons\” .
    Hope, I could make me understood.
    The code is:

    Thanks very much for your quick reply.

  • 489. Saeid  |  September 9th, 2008 at 12:12 am

    it\\\\\\\’s me again.
    Problem solved.
    For me it was better to use the {exerpt} tag without {:more} option.
    Now I am satisfied with that solution.
    Thanks a lot.

  • 490. Mark  |  September 10th, 2008 at 7:59 pm

    Very useful plugin – thank you.

    My blog has about 50 posts. I have the plug-in set to display 4 similar posts per post. Sometimes the last few of the 4 are not similar at all. Is there a way to show less than 4 if the posts that would show have a low score/are not similar?

    Thank you.

  • 491. Rob  |  September 10th, 2008 at 11:08 pm

    Mark: Sorry, that isn’t possible (yet).

  • 492. Steve  |  September 11th, 2008 at 1:23 am

    Thanks for the code with the custom part you noted above. I did not know that you had to put in the full {custom:event_start_date}, I was just putting in event_start_date in the Sort Output By: field.

    By doing that, and just sticking with identifying the exact posts I want to include in the Posts to include: Filter section (post numbers separated by commas) it works okay.

    If you get my explanation above, I think it would be a great feature to add to your plug in.

    Not sure what others think?

    Note that I do not think notifications are working for me on this thread – but I will try again.

  • 493. Rob  |  September 11th, 2008 at 5:46 pm

    Steve: Glad you are getting it to do more or less what you want! I’m not sure exactly what you are asking for in terms of new features… whatever they are they would have to be pretty general.

  • 494. Rob  |  September 11th, 2008 at 5:52 pm

    Mark: I’ve been looking into setting a cut-off point in terms of similarity — the problem is that the score which MySQL returns (and I weight) is pretty much a relative measure. Any particular cut-off will be too kind for some posts and too harsh for others.

  • 495. Steve  |  September 11th, 2008 at 6:26 pm

    In terms of new features – for me, it would be nice to automatically display specific posts without the need to specify the posts to include.

    Use custom fields – like start and end date – instead

    Not sure how to go about it. Maybe it won’t work.

  • 496. Mikey  |  September 19th, 2008 at 1:09 pm

    Hello there,
    {imagesrc} is great, can i suggest another parameter for default link if no image is found. Thanks

  • 497. Rob  |  September 19th, 2008 at 2:24 pm

    Mikey: That’s a good idea. Thanks.

  • 498. bearded  |  September 21st, 2008 at 2:53 pm

    Really a loving Plugin.. I have a little problem with Removing some other plugins Tag from Snippet. The Tag is: {column2} some text {/column2} . Will you pls clarify me WHERE and WHAT to put in the code! Thanks.

  • 499. Rob  |  September 21st, 2008 at 4:31 pm

    bearded: It depends on whether you want to remove the two tags AND all the text between them or just the tags and leave the text intact. I’m going to guess you want to take the text out too.

    If you go to the plugin’s submenu title ‘Other’ you should see two text boxes you can use to remove tags. In the ‘opening’ box enter {column2} and in the ‘closing’ box enter {/column2}. Save! After that the snippets should have the tags removed.

  • 500. bearded  |  September 21st, 2008 at 7:27 pm

    Rob, you are great.. thanks for such quick solution. One thing more, is there any other way to include the Tag Removal code into the Output Template which I am using with on a specific pages. e.g. included_cats=4&limit=1&skip=1&output_template={title:20 method:trim}{image:0:50:50}{snippet:200 method:b more:..}

    please tell me Where and What to include in this code for the Tag Removal. Thanks.

  • 501. Rob  |  September 21st, 2008 at 8:45 pm

    bearded: Sorry but the tag removal works on all snippets or on none :(

    I notice that you are not using output template tag parameters correctly in the code above. For example the snippet code you have is
    {snippet:200 method:b more:..}
    but it should be

    The parameters are all decided by where they come in the series of semicolons, not by name. I hope that makes sense.

  • 502. bearded  |  September 21st, 2008 at 9:54 pm

    Really Thanks for indicating the mistake.
    Regarding Tag Removal: Presently no problem! But if I have another Tags to be removed from Snippet, what to do? How it will be included in the Options Page?

  • 503. Rob  |  September 22nd, 2008 at 12:25 pm

    bearded: You can just stack the tags in the opening and closing text areas one above the other.

  • 504. bearded  |  September 22nd, 2008 at 4:07 pm

    Rob: Thanks for the Tips. Can I ask for another one..!
    Presently I am using Random Image plugin. But, I am not satisfied with its limited option. I want to shift to Recent Posts where I get the option of Image with Title/Snippet etc. But can I discard the post in the array, which don’t have Images with it? Is there any option of Cropping Images with a defind Size in Recent Posts?

  • 505. bearded  |  September 22nd, 2008 at 7:11 pm

    Rob: Sorry for this second fire continuously! In fact I am facing problem here.. I want to display two (may be more) snippets of two (may be more) different Cats, Skipping the Current Post (Skip One Post) each Cat. I tried this code, but not succeeded:-

    recent_posts('included_cats=4,8&limit=2&skip=1output_template=<a>{title:20 method:trim}</a>{image:0:50:50}{snippet:200:b:..}');

    Pls guide me what to do.

  • 506. Rob  |  September 24th, 2008 at 9:10 am

    bearded: Let me see if I can answer your questions in order…

    There is no way to drop posts without images. Well, there are two cases I can see and I’m not sure which you mean. It would be relatively easy to not display posts according to a criterion — the {php} tag would do it I think — but then you are left with fewer posts than you asked for. The hard task would be to drop posts and still get the full list of posts which do match your criteria, i.e., having images. It could be done but would involve some rather messy and non general MySQL. If I get time I’ll investigate how messy and non-general.

    Cropping images? No. Images can be resized for display in a number of ways but not cropped.

    Thirdly, if you want two posts for each of two categories you have to do a separate list for each, e.g.:

    recent_posts('included_cats=4&limit=2&omit_current_post=true&output_template=<a>{title:20 method:trim}</a>{image:0:50:50}{snippet:200:b:..}');

    recent_posts('included_cats=8&limit=2&omit_current_post=true&output_template=<a>{title:20 method:trim}</a>{image:0:50:50}{snippet:200:b:..}');

    I have also replaced the ‘skip’ parameter with one to omit the current post which is probably what you want. ???

    I also wonder about the <a>...</a> which seems to have no link destination.

  • 507. Rob  |  September 24th, 2008 at 11:21 am

    bearded: I take back what I said about your first question. I’ve been playing around for a little while and it seems pretty easy (and extensible) to add the ability to filter posts according to whether they contain certain bits of text. If the text in question is '<img' you can filter for images.

    I’ll play around a bit more and release the new code shortly if nothing goes wrong.

  • 508. Kjetil  |  September 24th, 2008 at 10:39 pm

    Promised to get back to you when our site’s new front page is in place, so if you like, have a look.
    I wanted
    – a main image that rotates on load or daily basis (used random images)
    – a list of posts in a lefthand sidebare, with an image for the uppermost but not for the rest. Thought I should use your “Random posts” here, but I wanted a list of posts with an image just for the upper. Solution:
    – – XmasB Quotes for the top image and a
    – – Random post list without images below it
    – Below it all a row of images – the two first are Recent posts (the second set to skip 1 – that is, the first post/ to show the second last) – and the rest are fixed images for important parts of the site.
    Now I hope it all works well – even on PCs with Exploder – and that maybe it can be useful for some of you others out there.
    Thanks again for two fine plugins
    – a bit slow due to css tweeking…

  • 509. Kjetil  |  September 24th, 2008 at 10:41 pm

    PS Link to Random Images

  • 510. Rob  |  September 25th, 2008 at 8:25 am

    Kjetil: Looks good!

  • 511. ATLChris  |  September 26th, 2008 at 12:58 am

    Does this plugin only work with front page stories? I have a older story that is shown as the most popular story on my blog according to mint stats, but doesn’t even show up on the popular post section. I check my filter settings, and I can figure out why it wont show up!

  • 512. Syd  |  September 26th, 2008 at 8:00 am

    How would I attach no follow tags to each one of the links that it creates as similar posts. My site is SEO optimized so even linking between my pages will bleed page rank.

  • 513. Rob  |  September 26th, 2008 at 11:00 am

    ATLChris:As I’m sure you are aware the plugin has settings to choose just which kinds of pages get counted — if not look under the Other submenu.

    Settings aside, Popular Posts only starts counting viewing numbers from the point of installation so there will be a definite bias at first towards newer posts.

  • 514. Rob  |  September 26th, 2008 at 11:51 am

    Syd: The {link} output template tag is just shorthand for:
    <a href="{url}" rel="bookmark" title="{date}">{title}</a>
    You can use the fuller form and add in the nofollow and do any other modifications you want.

  • 515. ATLChris  |  September 26th, 2008 at 12:49 pm

    @Rob, thanks for the info, but I have checked all the settings and i can’t find anything that would cause this post to be filtered out. Also, I have been running the popular post plugin for a few days, and the number one post for the past 24 hours according to my stats doesn’t show up in popular post.

  • 516. Rob  |  September 26th, 2008 at 3:32 pm

    ATLChris: Could you perhaps give me some more information like which post etc. If you submit a bug report from the settings menu for the plugin it will fill me in a little too.

    You are not by any chance running a cache plugin are you?

  • 517. ATLChris  |  September 27th, 2008 at 12:45 am

    I just submitted the bug report, with all the information you asked for.

  • 518. jorge  |  September 27th, 2008 at 1:43 pm


    I try to shows only {postviews} on my theme with but it doesnt work….

    how can i show only {postviews} from my theme template?


  • 519. Rob  |  September 27th, 2008 at 3:26 pm

    jorge: Forgive me but I don’t understand. The {postviews} output template tag only works inside the output template of one of the post plugins. If you want to show the number of views directly in your theme you can use the popular_posts_views function.

  • 520. bearded  |  September 27th, 2008 at 5:44 pm

    Thank You ROB,
    But I don’t know how to use the Filter. Will you just guide me writing the code.
    And I am also waiting for.. as you assured “I’ll play around a bit more and release the new code shortly if nothing goes wrong”

  • 521. Rob  |  September 27th, 2008 at 6:20 pm

    bearded: Sorry, I got sidetracked with another project. Since I have to implement the behaviour into each of the post plugins it’ll take a day or two, depending on available energy.

  • 522. Winagain  |  September 29th, 2008 at 12:44 am

    I am trying to use Similar Posts in individual posts and filtering with custom fields.

    My custom field is “articleby”

    I have two authors:
    Sean Nalewanyj
    vince delmonte

    I am inserting this in my post:
    <!--SimilarPosts articleby=Sean Nalewanyj-->

    However, all related articles are shown, not just those of the author.

    The first article: “You Ain’t Squat ‘Till You SQUAT!” is from Sean Nalewanyj, but the other two showing are from vince delmonte.

    Can you help me find what I am doing wrong?

  • 523. Rob  |  September 29th, 2008 at 9:57 am

    Winagain: You are on the right lines but specifying the custom field to filter by is a little more complex. You have to name the custom field, name its required value and specify their relationship (in this case you want them to be equal). It ends up being a bit more verbose.

    <!--SimilarPosts custom-key=articleby&custom-op==&custom-value=Sean Nalewanyj-->

    If the only way you use Similar Posts in your site is to place lists in individual posts you can put some of that complexity into the general settings, i.e., the custom-key and the custom-op. The the code for the article would be:

    <!--SimilarPosts custom-value=Sean Nalewanyj-->

    An alternative approach which might or might not work for your setup is to use the setting to match the author. That way you could let the plugin use the author information to work out what to show and you wouldn’t have to resort to custom fields. Of course there may be some reason in your case why that is not feasible.

  • 524. jorge  |  September 29th, 2008 at 10:08 am

    hi rob,

    thanks for your fast answer…. i try

    but it doesnt work, what im doing wrong??


  • 525. jorge  |  September 29th, 2008 at 10:15 am

    HI i forget to put a ECHO before funtion!
    now it works…. many thanks!

  • 526. Winagain  |  September 29th, 2008 at 11:19 pm

    Rob, that did the trick! thanks a lot for your help!

    By the way, I noticed a bug:
    When using in Pages, the configuration in Other/ Look for manual links in custom field? has to be set to “No”, or the links won’t show.


  • 527. Rob  |  October 1st, 2008 at 10:40 am

    Winagain: Glad you got sorted out. I will look into the strange behaviour you report.

  • 528. Jont  |  October 2nd, 2008 at 10:26 pm

    Hi, your plugins are great, but i need help with Popular posts. It works, but i want to show in the single post, how many times was just it viewed and i don’t know how to do it. I tried everything with template tags and such. I mean it like this:

    some text
    the post was viewed 6x.

    Please help, or i’ll have to install wp postviews plugin. Thanks a lot.

  • 529. Rob  |  October 3rd, 2008 at 9:35 am

    Jont: Use the popular_posts_views() function. e.g.,

    this post was viewed <?php echo popular_posts_views(); ?> times.

  • 530. Jont  |  October 3rd, 2008 at 3:25 pm

    Thanks a lot, it’s working!

  • 531. Sukabumi  |  October 6th, 2008 at 5:43 am

    I just upload-install, but it’s not working. I couldn’t see the widget.
    Would tell me what’s going on?

  • 532. Adam Wulf  |  October 6th, 2008 at 8:08 am

    is there a way to ignore views by the administrator / logged in users?

  • 533. Adam Wulf  |  October 6th, 2008 at 8:20 am

    as a follow up to my question, i modified teh code of popular-posts.php on line 255:

    // the view counter...
    function pvc_tracker() {
    	global $posts, $current_user;
    	if($current_user->ID != 0){


  • 534. Rob  |  October 6th, 2008 at 8:37 am

    Adam: The tracker already has the option (set from the ‘Other’ submenu) to exclude views by any users who are logged in. Are you looking for something different here?

  • 535. Rob  |  October 6th, 2008 at 8:38 am

    Sukabumi: Can you give me more information? Which plugin for example?

  • 536. Adam Wulf  |  October 6th, 2008 at 5:24 pm

    Rob: I hadn’t seen that at first, but just checked it and it’s been turned on by default since install apparently.

    it wasn’t working for me – I’m logged in as admin but my post views still affected the ranking.

    this is on WordPress MU, so i imagine that’s the problem?

  • 537. J. Beaman  |  October 7th, 2008 at 1:43 pm

    Thanks for the outstanding plug-ins. Love them. Unfortunately, I’m having the same problem that Simone Brunozzi was having a few months back. Every time I publish a new post a few of the old posts change. I’ll talk a look and see if i can find some sort of connection.


  • 538. Maida  |  October 7th, 2008 at 4:58 pm

    Thanks fora great plugin. It’s working great for me.

    I have one small issue in that it seems to have disabled my AwsomNews plugin which has a ‘%%awsomnews%% ‘ special code for pages/posts. Before I installed your plug in, it was working fine, but now it just displays the ‘%%awsomnews%%

    Is there something I need to close to get it to recognize it again?

    My output is:

    <div style="font-size:11px;"><b>{link}</b><br>
    <div align="right"><a href="{url}">Read more</a></div>

    You can view the work in progress here:

    Thanks for your time and a great plugin.

  • 539. Maida  |  October 7th, 2008 at 8:16 pm

    I’ve been playing around with it, moved it to a different spot on the page, etc, but the only thing that brings back the news announcement is removing the <!--RecentPosts--> tag and of course, I don’t want to do that.

    If I replace <!--RecentPosts--> with the HTML generated, the news announcement displays fine. So it’s not the output itself, but something that must still be open/active during the call to Recent Posts that is not allowing the AwsomNews plug in to be recognized?

    I’m thinking out loud here – I only know enough PHP to harm myself and others 😉

  • 540. Javier Marchant  |  October 8th, 2008 at 9:56 pm

    Hello: I have a newspaper site. The plugin works well to show similar posts under every news.
    But, in the index, if I click over of a category (no over the entry) the site shows all posts. Even if I click over another category, the site shows the same (and large) list of post.
    How I to make the plugin list the posts of one category and no all the categories when I choose one of them?


  • 541. glenn  |  October 9th, 2008 at 3:15 am

    hi there

    I’m struggling a little with the recent posts plugin. I can get it working as default but I’m trying to limit categories and it doesn’t work when I customize the output.

    Here’s what I have:

    With this code, I get the default 5 most recent postings from any category.

    Anyone know why it isn’t working?


  • 542. glenn  |  October 9th, 2008 at 3:42 am

    Never mind…think I have it.


  • 543. bearded  |  October 12th, 2008 at 6:15 pm

    Dear ROB, it is just a reminder request. I am still waiting….
    as you told: “Sorry, I got sidetracked with another project. Since I have to implement the behaviour into each of the post plugins it’ll take a day or two, depending on available energy.”

  • 544. Korey  |  October 14th, 2008 at 12:51 am

    I am a newby… there a way to find the code or could someone post the code to do what Tim Ferriss is doing on his blog:

    Current Hits, All Time, Tim’s Favs in a tabbed format. So I’d replace that with Popular, Random, New Posts, etc?? Any advice would be greatly appreciated!

  • 545. Pedro  |  October 14th, 2008 at 6:52 am

    Hi there… I feel really stupid about that, but can’t seem to understand how to use the plugin. All I want to do is to have a page which would display a every comment ever made on the blog, to be used as a guestbook, from the last to the first. But I don’t know where should I insert the code calling for it. I’ve tried to create a page on the wordpress admin interface and simply insert the

    code as a post, but it didn’t work… I’d be really thankful if you could explain me how to do that!

  • 546. webmaster  |  October 14th, 2008 at 8:50 am

    thanks i’ll use this plugin for my sites.

  • 547. Kjetil  |  October 14th, 2008 at 9:25 pm

    @ Korey: Possibly this:
    – but how to make the contents under each tab show up like he’ done, someone else might answer.

  • 548. Pablito  |  October 17th, 2008 at 3:58 pm

    I have try to add the plugin on my WP 2.6.2 easy and work very fine, thanks!
    I call the funcion with but the plug in put only a special character before the title of each post like °

  • 549. KittyCat  |  October 18th, 2008 at 5:32 am

    Hi! I’m having trouble inserting the tag in my theme editor. It works fine with my other blogs…not sure what’s up with this one?

    I tried:

    AND this:

    Related posts:

    Both show up as fatal errors! Please, please help…


  • 550. Slav  |  October 19th, 2008 at 7:39 am

    Hi! It seems there’s some incompatibility issues with AdSense Deluxe plugin. I’ve installed Recent Posts plugin and AdSense Deluxe just stopped functioning.

    With RP disabled – no problem.

    Any idea?

  • 551. Maida  |  October 19th, 2008 at 5:05 pm

    Kittycat, you need to use the ‘code’ tags around your tags – they aren’t showing up in your post

    Slav, I had the same compatibility issue with Awsom News Announcement plugin when I was trying to put them both on the same page, but it worked fine when I used them in a template. Have you tried moving the code around so one is before the other?

  • 552. Biz Davis  |  October 20th, 2008 at 6:58 pm

    I love the plugin, but is there a way to use !empty in the if / then statements?

    I need to check if a custom field exists before displaying it, and, while that’s easy to do in a custom mini-loop, I can’t seem to figure out how ot do it , if it’s possible, in this plugin.

    Can anyone help me out? I just need to check if a field exists using {custom} and display a blank image if not.

  • 553. MP  |  October 22nd, 2008 at 1:20 am

    I have my recent comment output template set to: {commentcount}. Now each post show how many comments have been made, that’s great, but is there a way to click on the comment’s number to make the comments appear? Thanks!

  • 554. Jason  |  October 24th, 2008 at 12:45 am

    I want to add some CSS to my Similiar Posts. How can I do that.

  • 555. Jason  |  October 24th, 2008 at 6:56 am

    I am using wp-email plugin and I want the similar posts to show in the emails. and it DOES show, but always says NO related articles are found, even though on my site, there are tons. I also use the wp-print plugin and that works fine.

    Any idea how I can fix this??

  • 556. astera  |  October 24th, 2008 at 7:48 pm

    thank`s for that nice plugin. But I have a problem.
    As you can see on my homepage:
    I count the similar and popular posts. But if I click on one post it count the post 3 times.
    Before I click it count 120 times and after the click it count 123 times or more.
    Can you tell me why?
    Thx a lot


  • 557. Thomas  |  October 29th, 2008 at 6:59 pm

    I work with Recent Comments plugin. My code is in the sidebar is

    <?php recent_comments(‘output_template={commenterlink} zu {title:22:trim}‘); ?>

    The output is always rel = nofollow. What can I do for release rel = follow for Commenterlink.

    Thanks for your Help.

  • 558. Manuel  |  October 30th, 2008 at 11:06 am

    Great plugin, really… just a question: what’s the parameter for the site url?

  • 559. Wingman  |  November 3rd, 2008 at 3:39 pm

    Hey! Thanks so much for your work on this plugin.

    I’m having some issues with conditional tags, specifically is_single(). Is it possible that these are happening because I’m running WordPress 2.3 with the latest version of your plugin?

    Thanks for your help!

  • 560. martin  |  November 3rd, 2008 at 5:36 pm

    my earlier problem is now solved with the use of parameters etc.

    Thanks for a great plugin.

  • 561. Japublicidade  |  November 10th, 2008 at 12:48 pm

    Thanks for your Jobs!

  • 562. Prasannah  |  November 11th, 2008 at 12:19 pm

    Hi Rob! Thanks for the great plugin! I’m running it on WordPress 2.7 Beta 2 without any trouble!

    I have a small issue with the customization though..
    I have used {link} as the output template and ',' as the divider. I hav also removed all instances of <ul> and <li> elsewhere in the settings.

    In the output, I get a after every item, which again makes it all look like a list. Am I missing something here?

  • 563. Prasannah  |  November 11th, 2008 at 12:22 pm

    Sorry for the double post.With reference to my previous comment. I get a line break (a br tag) after every item in the output. How do I get around this?

  • 564. Iconblog  |  November 13th, 2008 at 11:42 am

    Thank u very much.

  • 565. Chris  |  November 14th, 2008 at 4:22 pm

    In my sidebar I’m using

    to display a thumbnail related to the recent posts. I’m wondering if there is a way to link the thumbnail to the post instead of just having the {link} title above the thumbnaillinking to the post?

  • 566. Chris  |  November 14th, 2008 at 4:25 pm

    Opps, sorry it removed the code I inserted in the previous post.
    I’m basically using a “custom” tag to display thumbnails related to the posts (custom:post_thumbnail). Is there a way to link the thumbnail image itself to the post?

  • 567. Kjetil  |  November 15th, 2008 at 9:50 pm

    @Chris – I’ve asked the same question previously, so here’s the code: <a href="{url}">{image:0:162:162}</a><br />{link} – where the two 162s defines the size of the thumb. The br and following code makes a text link show up under the thumb.
    Hope this helps

  • 568. Roy Arellano  |  November 16th, 2008 at 12:38 pm

    Is there a way to get {title} turned into a link to that specific post?


  • 569. gdenarayana  |  November 16th, 2008 at 8:07 pm

    it works like a charm in my blog :)

    thank you 😉

  • 570. Alex  |  November 20th, 2008 at 10:42 am

    Hi! Your plugins are great,
    I was just wandering how do I clear the statistics for popular posts (the number or views)? Or can I display the views, for example, for the last month/week?

  • 571. Roger one  |  November 20th, 2008 at 6:07 pm

    Hi there,

    Really a great plugin that you wrote. I need just a little help with {if} and {image}. I’m trying to dispaly pictures as links (works nice) but I would like to skip posts who doens’t contains thumbs. Any ideas ?

  • 572. ModMyRV  |  November 21st, 2008 at 4:11 am

    I have the same problem as astera. When a post is viewed, the post view count is incremented by 3 rather than 1. What causes this? Thanks.

  • 573. Marc  |  November 23rd, 2008 at 2:02 am

    Hi :-)

    Question about Recent Comments / Show only one comment per post:

    I changed it today to display only one comment per post.. No I have the “problem”, that it shows the *first* comment – and not the latest?!
    Is it a Bug?
    Thx for help and answer :-)

  • 574. slobjones  |  November 23rd, 2008 at 2:57 am

    Installed the library and this plug-in, but here’s what I got when I tried to configure recent-posts:

    Cannot load recent-posts.php.

  • 575. koullis  |  November 23rd, 2008 at 10:33 am

    only the general options work…the other im getting Cannot load recent-posts-.

  • 576. Tom  |  November 23rd, 2008 at 12:07 pm

    Hello there,
    {imagesrc} is great, can i suggest another parameter for default link if no image is found. Thanks

    Any news on this feature? Thanks Rob!!!

  • 577. Jeff Friesen  |  November 24th, 2008 at 2:12 am

    This plugin is amazing. But maybe its overkill for what I want to do. I just want to make sure it show ALL posts for the current category in the sidebar widget (except the current post).

    • Limit to 15 (although I would like more)
    • Match the current posts category: Yes
    • Match the current posts category: No
    • Match the current posts category: Author

    I currently have 14 posts in one category, and it only outputs 8. Any ideas?

  • 578. Jeff Friesen  |  November 24th, 2008 at 2:13 am

    sorry, that last bullet point should say:
    • Match the current posts Author: No

  • 579. jun  |  November 24th, 2008 at 7:36 am


    i was trying to add a url var to the {link} tag
    the code i use as below:

    recent_posts('included_cats=3&output_template=<span id="title"><a href="{url}&var=test">{title}</a></span><br>{excerpt}<br><br>');

    i tried to change the & to & but still no luck on it.
    Any idea how can i add the url var?

  • 580. Fape  |  November 27th, 2008 at 11:50 am

    I’m trying to show “Most commenter” but I can’t do it.

    I am using this:

    limit=5&output_template={commenter:15:trim} – ({commentcount})&show_type=comments&group_by=author&no_author_comments=true&match_cat=false&status-publish=true&age-direction=after&age-length=30&age-duration=day&prefix=

    What am I doing wrong?

    Thanks for your help!!

  • 581. Ole  |  November 27th, 2008 at 8:50 pm

    Hi :)
    I’m trying to get the thumbnail file from the first image of my posts. It works great from the posts that contain an image in full size, but when the image is inserted in medium size the thumb won’t show up.
    The output template I’m using is this: {imagesrc:0::?t}
    When I look at the source code it is adding 100×100 after 400×300, which is the medium size.

    Anyone else experiencing this problem? :S

    Appreciate your help!

  • 582. Kjetil  |  November 27th, 2008 at 9:00 pm

    Ole: You could try
    {image:0:162:162} – where the latter numbers define the thumb’s size.
    If you want it clickable, and even with a link under, use
    <a href="{url}">{image:0:162:162}</a><br />{link}
    (without the “code” – if it shows after I click Submit)

  • 583. Ole  |  November 27th, 2008 at 10:24 pm

    Hi Kjetil! Nordmenn her? : )
    This does kind of work, but it seems to just take the full resolution image and downsize it. This makes the thumbnails unproportional and heavy to load.

    Any ways to make this medium size ending of the image name disappear?

  • 584. Fran  |  November 30th, 2008 at 8:32 am

    Just a quick one – how do I remove the text that says ‘recent posts’. I don’t want anything up there, or at least not the way it is now because it takes up too much space.

    Really loving the plugin so far :)

  • 585. Rob  |  December 1st, 2008 at 4:35 am

    I dont think I’m using the parameters right for commenterlink. Your directions say to reference {link} in which I cant find above. Can you provide an example. I should be good to go from there. Heres what I’ve been trying:

    recent_comments(‘limit=3&output_template={commenterlink:5:{title:maxlength:method}} – {commenterip} Commented on {link}&divider=’)

    It seems to ignore the formatting. Any idea why?

  • 586. shedmore  |  December 5th, 2008 at 3:01 am

    I feel like I may have asked this before…but I cant find the comment??? If I did, sorry for the duplicate question.

    In any case, I wanted to first say thanks for the great work you have done on these plugins, they are awesome.

    I am trying to setup the popular plugin on the archive page…but I need it to be aware of which category id its in (so that it only pulls in from that current category)

    I tried this (hoping it would work) but I imagine I have some syntax mixed up…any suggestions?

    <?php $current_cat_id = get_query_var('cat');?><?php echo $current_cat_id; ?><?php popular_posts('limit=6&included_cats={php:echo $current_cat_id}');?>

    P.S. Obviously, please ignore the echo, I was just using it to test whether it was actually picking up the cat id

  • 587. max  |  December 5th, 2008 at 11:25 am

    can someone please tell me how can i change the color of the post plugin?

    Lelia i tryed your code with a litle fix but no luck..

  • 588. Bas  |  December 5th, 2008 at 1:52 pm

    Hi all,

    How do i display an image thumb before the text (url?)

    I have not this:

    {image:0:40:40} {title}</li

    But the image doesn’t comming up. I have placed all my images into the folder: /wp-content/uploads/

    How to fix this?

  • 589. Jean  |  December 6th, 2008 at 7:35 am

    A new problem – the plugin works well and in my case I use it to pull the optional excerpt. I place small thumbnail images in my optional excerpt however and they aren’t being shown in similar posts.

    example: Lorem Ipsum optional excerpt text with each post.

    The image is being stripped out in similar comments only, it shows up anywhere else I use .

    How can I make it NOT strip out the small thumbnail image from my optional excerpts ?

  • 590. Jean  |  December 6th, 2008 at 7:37 am

    ignore the example in my comment above, it stripped the thumbnail image too. I need to know how to get the similar posts plugin to leave the ENTIRE optional excerpt intact including the align left thumbnail.


  • 591. Kjetil  |  December 6th, 2008 at 11:15 am

    Forgot to mention – this also makes the image clickable. If you don’t want that, remove the <a href="{url}"> and </a>

  • 592. Jean  |  December 6th, 2008 at 3:40 pm

    If I could get the “excerpt” not to strip the thumbnail image I put in every optional excerpt I wouldn’t have any image related problems like re-sizing.

    Any idea on how to get the to show up when it’s part of a posts optional excerpt ?

  • 593. asfodel  |  December 6th, 2008 at 3:42 pm

    When I inserted the code <?php similar_posts(); ?> in my single.php page, it broke the site. (The site was still visible but it was completely unstyled) I’m using wordpress 2.1.

    Any advice?

  • 594. bily  |  December 7th, 2008 at 5:53 am

    thanks for the awesome plugin!

    I’m just curious, what exactly determines the top x number of Popular Posts? What makes them Popular? Is there a way I can view that somewhere? I scanned through some of the comments and did a search but couldn’t find an answer. Sorry if this is a repeat..

  • 595. supersmoos  |  December 8th, 2008 at 6:00 pm

    Is it possible to put manually the title and get related content (like similar_posts() function) ?

    I’ve made a page width video and and want to put to similar_posts() function the video’s title to found similar posts in my DB.

    Can you help me ?

  • 596. Vivek  |  December 13th, 2008 at 11:27 pm


    I want an output of 5 post for each category ( i.e , if post have 3 category , 5 recent post from each categories )

    which code should i use, i am still a noob at wordpress.

  • 597. Chris  |  December 18th, 2008 at 6:11 pm

    Seems the Plugins are discontinued? There isn’t any feedback since early October and I have more problems than ever with WordPress 2.6.2 and 2.7.

    Always the same Similar Posts are shown and for Recent Posts and Recent Comments I can’t access the options pages anymore. (”Cannot load recent-posts.php” error and “Fatal error: Cannot redeclare recent_comments() (previously declared in …” error).

    What to do? Ahhhhh, Rob, come back please! 😉

  • 598. Ben  |  December 21st, 2008 at 12:46 am


    Sick plugin. Please keep this updated with new versions of WordPress. This has to be one of the most useful plugins out there. Awesome!

  • 599. Greg Atkinson  |  December 26th, 2008 at 2:27 am

    Merry Christmas!

    Now for business :) I seem unable to display more than 6 recent comments in the widget sidebar although I have more comments approved and available for display. I have not got any filters in place and am basically using the default settings. I saw the older comments displayed earlier but when further comments arrived they were not shown anymore (since only 6 are currently being shown)

    Any suggestions?



  • 600. suresh  |  December 30th, 2008 at 8:13 am

    Similar posts is excellent.Thanks for the plugin. However i’m struck with a custom tag thumbnail.

    The thumbnails shows up very large in the sidebar . how do i resize ? pls advice. thanks.

  • 601. suresh  |  December 30th, 2008 at 8:15 am

    sorry. it had href. trying to repost my question.

    Similar posts is excellent.Thanks for the plugin. However i’m struck with a custom tag thumbnail.

    The thumbnails shows up very large in the sidebar . how do i resize ? pls advice. thanks

  • 602. suresh  |  December 30th, 2008 at 8:27 am

    Plugins are excellent.Thanks for the plugin.I’m using it along with Post-Plugin Library. . However i’m struck with a custom tag thumbnail. I’ve added code in the output template but thumbnails shows up very large in the sidebar . how do i resize ? pls advice. thanks.
    <li><a href="{url}"><img src="{custom:thumbnail}"/>{link}</li>

  • 603. suresh  |  December 30th, 2008 at 8:39 am

    nevermind. i was able to fix it. here is what i did..

    <li><a href="{url}"><img src="{custom:thumbnail}" width="48" height="48" alt="" />{link}
    <div class="clear"></div>

    thanks again for the excellent plugin.

  • 604. Daniel Quinn  |  January 6th, 2009 at 4:24 am

    Is there a way to have the plugin skip a number of posts after the current post? That is, if I want to get 5 posts following the current post in the loop, how would I go about doing that? I tried this (and many other combinations):

    <?php  recent_posts('skip=1&limit=1&match_cat=true&output_template=<li class="cd-cover"><a href="{url}"><img src="{php:bloginfo("url");}/images/{custom:album_cover}" alt="{title}" /></a></li>'); ?>
    <?php  recent_posts('skip=2&limit=1&match_cat=true&output_template=<li class="cd-cover"><a href="{url}"><img src="{php:bloginfo("url");}/images/{custom:album_cover}" alt="{title}" /></a></li>'); ?>
    <?php  recent_posts('skip=3&limit=1&match_cat=true&output_template=<li class="cd-cover"><a href="{url}"><img src="{php:bloginfo("url");}/images/{custom:album_cover}" alt="{title}" /></a></li>'); ?>
    <?php  recent_posts('skip=4&limit=1&match_cat=true&output_template=<li class="cd-cover"><a href="{url}"><img src="{php:bloginfo("url");}/images/{custom:album_cover}" alt="{title}" /></a></li>'); ?>
    <?php  recent_posts('skip=5&limit=1&match_cat=true&output_template=<li class="cd-cover"><a href="{url}"><img src="{php:bloginfo("url");}/images/{custom:album_cover}" alt="{title}" /></a></li>'); ?>

    …but the plugin always skips from the most recent post, rather than the post currently in the Loop.

  • 605. Sam  |  January 6th, 2009 at 5:20 am

    Thanks for the great plugin,

    I need to show Related Posts with Tag “{link}” and with Some Initial Content (upto the WP Tag ““).

    I know we can show Tag “{fullpost}” along with {link} Tag.

    Please advise me, is there any Related Post {Tag} which can do the above, (hope you understand what i mean). or any php file modification which can bring my required results.


  • 606. Sam  |  January 6th, 2009 at 5:29 am

    Sorry the above post appears unclear. Please follow this.

    I need to show Related Posts with Tag “{link}” and with Some Initial Content (upto the WP Tag ‘Read More’).

    I know we can show Tag “{fullpost}” along with {link} Tag.

    Please advise me, is there any Related Post {Tag} which can do the above, (hope you understand what i mean). or any php file modification which can bring my required results.


  • 607. Paul O'Brien  |  January 8th, 2009 at 7:29 pm

    Anyone aware of a bug in which the Reply – Quote functions don’t work? I’ve got Recent Comments added to a Page (static homepage) and the quotes appear but the Reply – Quote options, which also appear, are not linked.

    Otherwise, awesome post though I’ve spent days searching for something with its functionality!

  • 608. O'Brien  |  January 9th, 2009 at 8:58 am

    Is there any way to implement this twice? I’d like to use it to pull one format on a page and a different format on another page.


  • 609. erick  |  January 11th, 2009 at 4:29 am

    Hi. I need help with configuring this plugin Recent Posts.

    I basically want to show in my index template two different categories conditionally. If the current language is english, I show recent posts from category 5, otherwise category 13.

    I try this code:

      if ($LANG == 'en' and function_exists('recent_posts')) 

    But this is not working! When I have any condition like this, recent_posts does not print anything!

    What am I doing wrong?

  • 610. erick  |  January 11th, 2009 at 4:30 am

    Hi. I need help with configuring this plugin Recent Posts.

    I basically want to show in my index template two different categories conditionally. If the current language is english, I show recent posts from category 5, otherwise category 13.

    I try this code:

      if ($LANG == 'en' and function_exists('recent_posts')) 

    But this is not working! When I have any condition like this, recent_posts does not print anything!

    What am I doing wrong?

  • 611. erick  |  January 11th, 2009 at 4:31 am

    Hi. I need help with configuring this plugin Recent Posts.

    I basically want to show in my index template two different categories conditionally. If the current language is english, I show recent posts from category 5, otherwise category 13.

    I try this code:

      if ($LANG == 'en' and function_exists('recent_posts')) 

    But this is not working! When I have any condition like this, recent_posts does not print anything!

    What am I doing wrong?

  • 612. Erick  |  January 11th, 2009 at 4:33 am

    Sorry for the repeat posts. Please delete. The blog is very slow in my country so I resubmitted. The code is:

      if ($LANG == 'en' and function_exists('recent_posts')) 

    Thx for any advice

  • 613. Erick  |  January 11th, 2009 at 4:34 am

    Sorry for the repeat posts. Please delete. The blog is very slow in my country so I resubmitted. The code is:

      if ($LANG == 'en' and function_exists('recent_posts')) 

    Thx for any advice

  • 614. Marc  |  January 15th, 2009 at 5:19 am

    Is there a way of making the Random Posts only pull a post per day?

  • 615. Avi Marcus  |  January 18th, 2009 at 1:01 am

    Uhm… did wp 2.7 kill this plugin? I just get “none found” on all my old posts! I even recreated the index… what happened?! This is such a great plugin!

  • 616. Freddy  |  January 19th, 2009 at 9:59 pm

    does the {custom:thumbnail} option work in 2.7? because i can’t get it to work for some reason! thanks and keep up the great work.

  • 617. Zach  |  January 23rd, 2009 at 6:00 pm

    Is it possible to only show one category in the output. Some of my posts are in 2 categories, but I only want the first one to show.

  • 618. selvabalaji  |  January 31st, 2009 at 6:12 am

    i was added the recent post plugin and i get the recent post title ..

    i need to recent post content .. so what i will do … please help me…

  • 619. I Hate Acne  |  February 15th, 2009 at 2:49 am

    Hey Rob,

    Just wanted to say thanks… I’ve been using Similar Posts for a while and its by far one of the best plugins around for related posts.. Love the options and appreciate your effort in providing support.

  • 620. Marc @ NoRecipes  |  February 16th, 2009 at 9:13 am

    Hi Rob, great plugin! I had no idea it could include images until I played with an inferior plugin tonight and did some digging on this page.

    I know you’ve previously said in your comments that you haven’t been able to add cropping functionality, but since WP now auto creates cropped thumbnails when you upload images to it’s image gallery, I was wondering if there’s some way to mode the output_tags.php file so it pulls the thumbnail instead of the image in the post. The line I’m refering to is this:

    preg_match(‘/s+srcs*=s*[‘|”](.*?)[‘|”]/is’, $imgtag, $matches);

    My regex is pretty aweful so I’m not sure how to change this, but I feel like there should be a fairly simple way to change this so instead of pulling “steak-1-500×334.jpg” which is the first image in the example post, it could pull “steak-1-150×150.jpg” instead?


  • 621. Digigirl  |  February 16th, 2009 at 5:40 pm

    Hi Rob. Thanks for the awesome plugins! They work like a charm.

    Only problem I am having is with formatting. I have installed the Random Posts plugin using the Arthemia Free theme and using custom:minithumb have it showing just an image with a link to the post – no text. When I did this using another theme, it worked perfectly. In this theme, the link works, but it runs all the images together – no spaces in between.

    I’ve been experimenting with the settings in Output for days and have looked into the theme’s sidebar css but can’t find anything that fixes the problem. I’m just not a coder, so I’ve reached the end of my chimping abilities.

    Can you give me any guidance on how to fix this problem?

    Thanks again!

  • 622. Digigirl  |  February 16th, 2009 at 9:11 pm

    Never mind! It was a cross-browser thing and I’ve figured it out. Thanks again!

  • 623. cotton  |  February 22nd, 2009 at 10:07 pm

    This is a tuly fantastic plugin. I have spent ages working on different ways to customize the output. It seems like there are endless possibilities. I am stuck on a very basic thing, not sure if I am doing something wrong or have misunderstood the codes. I saw there was one person previously asking to clarify a similar thing.

    I am basically trying to organize my related posts from latest at the top and oldest at the bottom, now its vice versa. I have tried the ascending and descending settings in the admin, I have also tried to insert order1=SORT_DESC and order1=SORT_ASC . Nothing happens. Any advice would be much appreciated.

  • 624. Klaus  |  February 23rd, 2009 at 1:20 am

    Please, I want to use this function, but I dont want to show the image or the alt-tag for the image if the image does not exist. What must I do to solve the problem?

    <?php if (function_exists('recent_posts')) : ?>
    <?php recent_posts('included_cats=3&limit=4&output_template=<li><a href="{url}" title="{title:30:trim}"><img src="{imagesrc:0::?t}" class="post-image2" alt="{imagealt:0}"/></a></li><li class="zeile1-list-title">{link}</li><li class="zeile1-1-excerpt">{excerpt:55} ... <a href="{url}" title="Read more">Read more</a></li>'); ?>
    <?php endif; ?>

    Thanks a lot, and have a nice day!

  • 625. effemmeffe  |  February 24th, 2009 at 3:21 pm

    The divider seems broken.

    I’d like to have a text like:
    Similar posts: title 1, title 2, title 3

    Output template: {link}
    Text and codes before the list: Similar posts:
    Text and codes after the list empty
    Text and codes between items: ,
    The text between items is a single comma with no space before or after.

    What I get is
    Similar posts: title 1 ,title 2 ,title 3

    Notice the space before the comma and the lack of it after comma.
    I tried to use a comma followed by a space as text between, but when I press Save Output settings the space is removed and there is no space in the output.
    Any idea?
    Thanks in advance.

    WordPress 2.7.1
    Similar Posts
    Post-Plugin Library

  • 626. Keith  |  February 26th, 2009 at 2:46 pm

    Found a slight bug – if you’re using {taglinks} in the output, it will crash if it matches on a post without tags:

    “Catchable fatal error: Object of class WP_Error could not be converted to string in [edit]/wp-content/plugins/post-plugin-library/common_functions.php on line 182”

    Dumping the $replacements array gives the relevant WP_Error as:
    “[{taglinks}] => WP_Error Object ( [errors] => Array ( [invalid_term] => Array ( [0] => Empty Term ) ) [error_data] => Array ( ) ) )”

  • 627. stephen  |  February 27th, 2009 at 8:13 pm

    i pasted the

    <?php recent_posts(); ?>
    into my blog. but how can i have the recent posts show up on another area of my website?

    My website has 7 pages not touching the blog section. and i want the latest posts to show up on the sidebar of my other 7 pages.

    how do i do that? seems the code only works on the blog pages.

  • 628. Stephen  |  March 5th, 2009 at 5:36 am

    Wow, so happy I found this great plugin for WordPress!!

    Ok, I am embedding my gallery shortcode in my Post theme template like this:

    <?php echo do_shortcode('[gallery link="file" columns="3" orderby="ID DESC"]'); ?>

    And then on my index.php I am using this:

    <?php recent_posts('skip=0&limit=1&tag_str=foodpics&output_template=<a href={url}>{image:0:?:120:post::}</a><br>{link}'); ?>

    I am using both “pre” and “post” but neither seems to find the image. If I add the gallery shortcode directly into each blog Post I create (rather than the actual template), it works fine. So if there like a way to do a “post-post”? :)

    I realize there are lots of “post” in my query above, and some mean “post” after teh php is rwad and others mean “Post” to signify the actual blog Post 😉

  • 629. TomsTricks  |  March 6th, 2009 at 2:49 am

    Thanks for this great plugin.After using this plugin in my site,the Pages/visit ratio dramatically increases.

  • 630. John  |  March 6th, 2009 at 12:01 pm

    how do you display {postviews} outside of wordpress, in php?

  • 631. cotton  |  March 6th, 2009 at 2:12 pm

    I am trying to change the order of my related list from latest posts at the top. Currently its older posts at the top. I have tried to insert order1=SORT_DESC and order1=SORT_ASC . Nothing happens. Sorry this is my second comment with the same issue. I would really appreciate if anyone could help me with this.

  • 632. andreu  |  March 9th, 2009 at 1:17 pm

    Hi. I want to asign a number to each post of the list for my CSS style. For example:

    <li class="number1">Post 1</li>
    <li class="number2">Post 2</li>

    I’ve been trying to assign it with a bit of php:
    {php:$post_num++;echo $post_num;}
    But the number printed is always 1.

    Any suggestions?

  • 633. david  |  March 9th, 2009 at 6:04 pm

    Hi. Is there any way to color code the {categorynames} dependent on the category?

    For Example

    Category1 Text is red
    Category2 Text is blue


  • 634. david  |  March 9th, 2009 at 7:44 pm

    Nevermind I managed to do something close to what I wanted using Category Icons 😀

    Thanks for a fantastic plugin! 😀

  • 635. fred  |  March 13th, 2009 at 9:43 am

    Hi all,

    I use the plugin as widget.

    I would like it to be displayed only when i ap on a page or on a post, but not when i am on the homepage, which allready shows the last entries.

    I can’t find an answer up there.

    someone help ?


  • 636. Bruno  |  March 13th, 2009 at 10:23 am

    Hi, great work indeed!!! I was wondering if is it possible to show also a post rating (I mean, the stars…). I’m using WP-Postratings as a plugin.



  • 637. Gur Rosen  |  March 14th, 2009 at 10:16 am

    Don’t understand where to put the devider in. I’m not that great in CSS. Or maybe I didn’t find the right option in the plugin?
    Right now the recent posts in my blog show the extra ‘ in front and at the end, so where should I put the devider and HOW do I write the function down in order for it to work?
    Rather then that – a great plugin. Thanks!

  • 638. Windows Vista Help  |  April 2nd, 2009 at 2:42 pm

    Thank you Rob. I think the css coding may be the tricky part. I will give it a while.
    thanks for this plugin

  • 639. Windows Vista Tweaks  |  April 2nd, 2009 at 2:46 pm

    This plugin help me to decrease my website’s bounce rate

  • 640. hendra  |  April 19th, 2009 at 2:56 pm

    Just my advice (again),

    Beside {categoryid}, may be you should create {authorid} too. It must be very usefull for us. Thank you. :)

  • 641. kunal  |  April 27th, 2009 at 8:25 am

    Hey Rob,
    Great plugin. Can anyone who has managed to use cropped images with these plugins tell us how?

    Also, when I scroll over the images pulled up by the random_posts plugin, it shows me the image title/alt. How can I show the post title instead?

    The code I use is:

    <?php if (function_exists('random_posts')) random_posts('limit=15&skip=15&output_template=<a href="{URL}" alt="{title}">{image:0:100:100}</a>'); ?>


  • 642. travis neilson  |  April 29th, 2009 at 4:32 am

    hey, Great plugin. I think its really great that i can style it the way i need it to be.

    I have 2 problems with it though, the two last paramater i am using are just not working. I keep getting the current post shown in the list of random posts, and most importantly i am getting the archive page show up in the list, even though its a ‘page’

    <?php c2c_get_random_posts( $num_posts = 5,
    			  $format = "<div class=grid_4_alpha><h4>%post_date%</h4><h2>%post_URL%</h2></div><div class=grid_4_omega><span class=excerpt>%post_excerpt%</span></div><div class=clear></div>",        
    			  $categories = '',
    			  $order = 'DESC',
    			  $offset = 0,
    			  $date_format = '',
    			  $authors = '',
    			  $post_type = 'post',
    			  $post_status = 'publish',
    			  $include_passworded_posts = 'false',
    			  $show_pages = 'false',
    			  $omit_current_post = 'true'
    			  ) ?>

    I would really love some help. Thank you very much.

  • 643. Jeremy Moore  |  April 29th, 2009 at 7:05 pm

    What is the process for removing tags from a snippet.
    For example, when using snippet the following shows up in the text. [youtube sUU1w1bjZL0 nolink] Below is the code i’m using, where would i put and how would i write the filter?

    <?php recent_posts('content_filter=true&output_template=<dt>{link}</dt><dd>{snippet:100:a:(read more):link}</dd><dd class="entry-meta">By <a href="/author/{author}" title="{author}">{author}</a> | {commentcount} Comments</dd>'); ?>

  • 644. ohbrooke  |  May 3rd, 2009 at 5:52 pm

    I want to use this plugin to show the first 5 lines of my “winners” page. How can I do that?

  • 645. hendra  |  May 6th, 2009 at 10:13 am

    This is about sort. How to sorting by an integer number (not string number)? For example, sort by an integer in {custom:views} (plugin: wp-post-views)

  • 646. Winmac  |  May 7th, 2009 at 8:58 am

    Hi there, I need to reset my {postviews}. I have accessed phpmyadmin and reset the postview table but to no avail. Please help. Thanks

  • 647. Stephen  |  May 11th, 2009 at 7:32 pm

    can the plugin be made to display title link and first 100 words of text – rather than just say 5 title links


    100 words excerpt

    100 words excerpt


  • 648. Stephen  |  May 11th, 2009 at 7:35 pm

    your anti spam is way too keen

    I had to cut my comment down 4 times before it was accepted – and even then it said it wasn’t sure if it was spam and presented me with a captcha

  • 649. ricland  |  May 13th, 2009 at 12:24 am

    I’m getting all the same thumbnails

  • 650. Nick  |  May 15th, 2009 at 9:40 pm

    Great plugins! How can I get the outputs to paginate, similar to how WordPress automatically does? For example, after the first 10 most popular posts, I’d like to go to page 2, 3, etc.

  • 651. George  |  May 18th, 2009 at 2:40 pm

    Rob: I had popular, similar, recent, random all successfully incorporated in my WP blog, but this weekend had to completely reinstall it due to getting hacked. I also reinstalled all the plugins. Now when I go to configure your plugins, I get this message: “Please install the Post Plugin Library plugin.” But I have Post Plugin Library installed and it shows up in my plugins list where I have activated it already! Any ideas?

  • 652. Curt  |  May 21st, 2009 at 12:00 am

    Great plugin. I’m looking to add a little vertical space between posts. I’m sure I need to do that in the theme’s CSS file but where exactly and what is the code snip I need?

  • 653. Andy  |  May 21st, 2009 at 9:26 am

    This is fantastic info – I’ve used some of these in conjunction with the Similar Posts plugin to display a list of posts with clickable post and category links and post excerpts.
    I’d been looking for something like this for ages – a bonus – it works fine on a WP 2.7.1 installation too!
    Many thanks
    Also, s tip for Curt: Just use the standard html code for a line break in the Output settings (if you are using Similar Posts)

  • 654. Stylin  |  May 21st, 2009 at 12:34 pm

    Love the plugin, need some help with {php:code}.

    I’m using the custom field to set an image thumbnail to each post. My single.php has the required code in place to check if an image exists for any post but I’m having trouble converting the php code required to show the image thumbnail into code useable by this plugin.

    Here is what I need the plugin to echo

    if($thumb !== '') { ?>
    	<img src="<?php echo $thumb; ?>"
    	alt="<?php { echo the_title(); } ?>"
    <?php } 
    else { echo ''; } ?>

    The if command is important, some posts don’t have a thumbnail. I’m not sure how to convert that.

    Thanks for your help.

  • 655. juma  |  May 21st, 2009 at 9:32 pm


    Great plugin but I need help – is there a tag to get the authors gravatar?

    Tanks for your help!

  • 656. Brian  |  May 22nd, 2009 at 11:18 am

    How would I organize similar posts to do the following:

    I have 6 posts, and for each post I want to indicate manually by post ID which of them show up under similar posts in a side widget.

  • 657. Mike  |  May 24th, 2009 at 6:42 pm

    Hi there. Thanks (again) for the wonderful plugins!

    Quick question, how could I call a HTML character, such as &raquo;
    from within a output template, such as:
    <?php if (function_exists('recent_posts')) recent_posts('included_cats=1&limit=7&output_template=<h4>{link}</h4><p>{excerpt}</p><p><a href="{url}">Read the full article</a></p>'); ?>

    (in which, I want to have the >> of the ‘raquo’ appear just after the “Read the full article” text)

    Thank you for any & all help!

  • 658. david  |  May 27th, 2009 at 4:21 am

    Very nice plugin, the output and css are much easier to adjust than other recent post plugins that I tried.

    I do have one problem. I’m using qtranslate for a multilingual site. In the output I use snippet, but the snippet is only in the default language. The titles are in the current language, but I can’t find where in the code I would add,

    if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) $output = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($output);

    To get the snippet to appear in the current language. Is this the correct approach? Any help would be appreciated. Thanks.

  • 659. Tom  |  May 27th, 2009 at 7:13 am

    I am trying to show the number of views by using “{postviews}” with 2.7.1 and having a problem.

    It gets counted by 2. (eg. 68 to 70, 70 to 72,)

    Is there any way to fix this?

  • 660. Omid  |  June 3rd, 2009 at 8:11 pm

    Thanks for the very useful plug-in. I have a problem in making this code work:

    <?php recent_posts(”|limit=5&output_template=
    {php:if (“{custom:night}” > date(“Y/m/d”))
    echo “{title}” . ” {custom:monthday} {custom:age}” . “”;}
    ‘); ?>

    when I take the part that’ is bold out the code work fine obviously :D. any suggestions to get around this problen would be great

  • 661. Omid  |  June 3rd, 2009 at 8:13 pm

    Thanks for the very useful plug-in. I have a problem in making this code work: (ignore my prev post plz)

    echo ‘“{title}”‘ . ” {custom:monthday} {custom:age}” . “”;}
    ‘); ?>

    when I take the part that’ is bold out the code work fine obviously :D. any suggestions to get around this problen would be great

  • 662. Jennifer  |  June 7th, 2009 at 3:54 pm

    Hi all. love love love the similar posts plugin. is anyone having the issue of similar posts duplicating in feeds (I see it in Google Reader, possibly others). Maybe it is a setting that I need to adjust? I am using version Firefox Mac. Thank you!

  • 663. emacrisema  |  June 15th, 2009 at 6:24 pm

    I need to show ratings below posts , but in order to do that I need to set current id . Can I do that in wordpress admin – settings – output ?

  • 664. Sue  |  June 18th, 2009 at 1:50 am

    Hi Rob,
    I am using Recent Posts for my “Featured” section and would also like to use it to present my most recent 8 posts (all categories) in the opposite sidebar.

    How do I need to modify the php tag to accomplish this, or is there a better way?

  • 665. Says  |  June 18th, 2009 at 5:59 pm

    Hi thanks for the plugin.

    Is it possible to have title of the article that is currently displayed along side recent post come up in bold? I tried working around this in CSS with the a:active {font-weight:bold;} but that didn’t work. Also, currently bullet points appear next to each title. I wanted to remove them and instead have an arrow pointe only at the active link.

    Any suggestion would be great. Thanks.

  • 666. David Radovanovic  |  June 21st, 2009 at 12:22 am

    Thanks for a nice plugin.

    According to the directions above: When I use {image:0:75:?} the added ‘?’ is supposed to produce a thumb 75 x 100, though what I get is a 75 x 1 pixel image.

    What might I be missing? Thanks.

  • 667. Chad  |  June 30th, 2009 at 12:21 pm

    This is simply an amazing plugin. Thanks for the hard work.

  • 668. Kris  |  July 2nd, 2009 at 10:50 am

    How can I make two columns? Do I have to put “” twice in the post.php or in the output in similar posts settings? Please help?

  • 669. kernowkid  |  July 2nd, 2009 at 12:48 pm

    I’m trying to get the ‘:sentences’ parameter in the {excerpt} option to work to result in full sentences to be displayed rather than being cut off mid sentence but I can’t figure it out.
    Currently got this:
    {excerpt:50: : : :0 }
    but not working. Can anyone advise?

  • 670. smit  |  July 8th, 2009 at 10:13 am

    I testing Similar Posts plugin in my site but I have warning message in menu Similar Posts > Filter Settings

    Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0
    in /…/wp-content/plugins/post-plugin-library/admin_common_functions.php on line 593

    Is there any way to fix this?

  • 671. Brian Bell  |  July 9th, 2009 at 8:06 pm


    I’m wondering if your plugin can be used as a sorting mechanism. What I would like to do is create an un-ordered list in my sidebar.php file with links like: Recently Added, Recently Modified, List Alphabetically, etc. When you click these links in the sidebar.php, the posts in index.php would reorder to fit that sorting, does that make sense?

    It seems that your plugin grabs posts fitting certain criteria, and the displays them where the function was called. What I’m wondering is if your plugin can act as a link in the sidebar, and call the function over in the index.php which would then reorder the posts in the index.php.

    Thanks for any help you can provide. I appreciate your willingness to offer so much support for this, it’s awesome!


  • 672. Lee  |  November 16th, 2009 at 11:32 pm

    I am unable to use the option page from the link in the Random Post widget, I get the message “You do not have sufficient permissions to access this page.”

    is it the same pasge I can get to via settings>random post link?, that is working ok

    any ideas how to fix this?


  • 673. Kevin  |  July 19th, 2011 at 8:14 am

    Great plugin.

    I was trying to figure out how to get a thumbnail image for a video clip to display, and I came up with a solution. Here it is:

    1. In the output panel I put:

    <a href="{url}">{title}</a><br>
    <a href="{url}"><img src="{imagesrc}" width="100" height="75" /></a>

    2. Then on the post page I used some simple span code to hide what would be an extra image:

    <span style = "display:none">
    <img src = "">

  • 674. Zach  |  July 22nd, 2011 at 5:20 pm

    Hey Rob,

    I’m trying to use your plugin to the the most popular posts. I can list out the posts fine, however I am having difficulty getting the thumbnail to display for each post… I have tried multiple solutions:

    {php: get_the_post_thumbnail($result->ID, array(100,100) ); }

    That code should work in theory… since you’re supposed to be able to pass in any post id and get the thumbnail for it.

    {php: the_post_thumbnail(array(100,100) ); }

    That doesn’t work because it just loops the same picture for each post.

    The thumbnail is being set as a featured image and is NOT being inserted into each post… I wish I could just the whole {image} output tag.

    Any help would be appreciated!

  • 675. How to show from specific category?  |  July 29th, 2011 at 3:44 pm

    I want to show recent post in a side bar from a specific category.
    I don’t know how to write the PHP code for the command.
    I used the plugin in many other sidebars, but there’s a side bar which I want to show the recent post in it from a specific category!

    Thanks a lot!

  • 676. Svensson  |  August 8th, 2011 at 7:39 pm


    Great plugin! Everything works great! But how do I make the image link to the post?

    All the best!

  • 677. Svensson  |  August 9th, 2011 at 9:43 am

    Sorry, found it. I did it like this:

    {image:0:250:125} {link}

    Works great!

  • 678. Rachel McCollin  |  August 10th, 2011 at 10:19 pm

    Hi Rob,

    This is a really useful plugin, thanks. I’m trying to use the popular posts plugin to display custom post types – can you tell me if this is possible and if so how I would do it? I can’t find anything in the settings and I’ve tried looking to see if anyone else has asked the same question above – but to be honest there are so many comments I didn’t look in that much detail!



  • 679. Marc  |  August 24th, 2011 at 10:31 am

    I can’t find an option to turn the content filter on. When I insert in a post, it only appears as a html comment if inserted in html and as text if in visual tab.

    Thanks in advance for your help.

  • 680. Marc  |  August 24th, 2011 at 10:37 am

    the is missing in my last comment.

    It should be:
    “…I insert in a post…”

    of course without the spaces before and after the brackets

  • 681. Marc  |  August 24th, 2011 at 10:59 am

    damn 😉

  • 682. James  |  August 24th, 2011 at 10:22 pm

    @Zach (comment #674)

    To output the featured image of a post, use the following code:

    {php: echo get_the_post_thumbnail($result->ID, array(100,100) ); }{link}

  • 683. Marc  |  August 30th, 2011 at 2:45 pm

    I found the content filter option:
    Got to Settings -> Similar Posts -> Placement

    There it is the last Option: “Output in content (via special tags)” -> Select yes.

    Now you can put <!--SimilarPosts--> in the html tab of your edit/create post view and the posts will be displayed.

  • 684. franky  |  September 1st, 2011 at 7:06 pm

    <?php popular_posts('limit=10&output_template=<div class="single_img_block_img"><div class="side_img_block">{php:$vthumb = get_post_meta($post->ID, 'video_thumb', true); echo $vthumb.'/default.jpg" height="72px" width="96px" />';}</div></div>'); ?>

    i’m trying to get this working, however, the php part returns a parser error.

    I also tried this <?php popular_posts('limit=10&output_template=<div class="single_img_block_img"><div class="side_img_block">{php: echo' test';}</div></div>'); ?>

    and it also returns same error.


  • 685. franky  |  September 1st, 2011 at 7:18 pm

    <?php popular_posts('limit=10&output_template={php:$vthumb = get_post_meta($post->ID, \'video_thumb\', true); echo $vthumb;} ');?>

    I got error message issue resolved. however, i’m only returning the last post’s $vthumb. Is there a way to retrieve all of them?


  • 686. Jesus Enrique Rosas  |  September 6th, 2011 at 4:52 pm

    Hey Rob, i hope you are doing well. ¿How i can style the text? i´m sure this is a dumb question, but been looking around how can i just adjust the font´s size. Obviously i´m not a PHP wizard, just entry / aficionado level. Thank you very much.

  • 687. Jesus Enrique Rosas  |  September 6th, 2011 at 5:02 pm

    never mind, i got it 😛 thank you for a great plugin!

  • 688. rocktivity  |  September 8th, 2011 at 4:46 pm

    Ideally, I would like my post page to have the current post in its entirely in the main area, and links to the next six posts in the sidebar. Can there me more than one recent post command?

  • 689. Fritz  |  September 11th, 2011 at 1:22 am

    The mysql database table for “similar_posts” has grown to over 9000Kb in size. My blog has around 2000 posts.

    Can I just empty the table to reduce the bloat?

  • 690. Paul Gardner  |  October 2nd, 2011 at 2:59 pm

    I have installed the Popular Posts plugin and activated it (after first installing the post-plugins library). But when I try to enter the configuration page, I get the following error: “You do not have sufficient permissions to access this page.”

    I am using the admin account and this is the first time I’ve ever had a plugin deny me access to it. Any ideas where I might be going wrong here?

  • 691. Ken  |  October 5th, 2011 at 9:09 pm

    I want to have a widget that omits one post on the front page, but then doesn’t omit it on other pages. Is there a way to do this?

  • 692. Bewitched  |  October 6th, 2011 at 11:24 am

    Hi, I’m using Popular Posts and I’m trying to customize the output. Currently it looks like this: {link}

    I’ve tried to add some variables to limit the number of symbols (maxlength:method) but when I add them the plugin seems to stop woking (I see nothing on the web site). So something like {link:maxlength:method} doesn’t work for some reason.


  • 693. Tom Copeland  |  October 26th, 2011 at 5:26 pm

    Great plugin. Quick question on syntax for output –
    Trying to get the excerpt and sentences to work. What’s the syntax? I’ve tried:
    {excerpt:sentences=1}, {excerpt sentences:1}, {excerpt sentences=1}
    Can you show me an example of how to properly use the string?
    Already rated this bad boy, awesome and super powerful – great work!

  • 694. Susan Kitchens  |  October 31st, 2011 at 9:24 pm

    I’m working with Recent Posts for display in a sidebar of a site.

    I’d like to somehow display the image as a cropped square thumbnail. Or else use the Output Settings to grab the special square-thumb version that I have put in the EXCERPT part of the blog post.

    Here’s the code I’m using for OUTPUT:

    <a href="{url}">{image}</a>
    {excerpt} <a href="{url}">Go &raquo;</a> 

    I’ve made special square versions of the photos, and uploaded the square photos in the EXCERPT portion of the WordPress admin section for the blog post in question.

    The plugin seems to be processing the image that’s in the body of the post. They’re showing squashed.

    You can see the current state of things by visiting and viewing left sidebar under “Feature”

    (I’ll next attempt to force a proportional thumbnail image using width tags)

    Thanks for any help/enlightenment you can provide!

  • 695. Susan Kitchens  |  November 1st, 2011 at 3:21 pm

    p.s. tho the last post said you can see it when you visit the site, I since went and uploaded a very small square thumbnail, so that the image that shows on the front page isn’t squashed. (You see it when you click through to an individual post; there are 2 images, a small square one, and the “real” image.)

    I see from elsewhere that this plugin won’t crop images.

    What isn’t clear to me is whether it can pull from the WordPress-generated thumbnail for an uploaded image.

  • 696. Gero  |  February 16th, 2013 at 1:17 pm

    I’m having problems with the output of a default image. As described for the {image} placeholder, there is a default option. As described this should be filled with an tag. But, if I try something like:


    Nothing is shown, if no picture is found. How do I have to format the tag to make it displayed?

  • 697. Gero  |  February 16th, 2013 at 1:25 pm

    Ups! The Comment form ate my tag. Replaced the opening and closing with a #

    {image:0:150:150:::#img width=’150′ height=’150′ alt=’Default Image’ src=’/wp-content/themes/wood/img/no_thumb.jpg’#}

  • 698. Rocktivity  |  September 2nd, 2013 at 7:39 pm

    Exactly what do you put where in the Placement section to make it work at a widget, and exactly what do you put in the text box on the widget page? Would a shortcode work?

  • 699. Rocktivity  |  September 25th, 2013 at 7:03 am

    Still having problems, the first five post are not being skipped.