Special Recent Posts (SRP) is a very powerful plugin/widget for WordPress which displays your recent posts with thumbnails.
The automatic plugin installer should work for most people. Manual installation is easy and takes fewer than five minutes.
If you wish to use the Special Recent Posts in another part of your theme which is not widget-handled, you can put the following snippet:
<?php
if(function_exists('special_recent_posts')) {
special_recent_posts($args);
}
?>
where $args is an array of the following options:
// Post Type (default: 'posts')
srp_post_type => post/page
// Post Status ('publish|private|inherit|pending|future|draft|trash)
srp_post_status_option => text
// Custom Post Type (text)
srp_custom_post_type_option => text
// The Widget Title (default: 'Special Recent Posts')
srp_widget_title => text
// Hide Widget Title?
'srp_widget_title_hide_option' => no|yes
// Display thumbnails? (default: yes)
srp_thumbnail_option => yes|no
// Thumbnail Width
srp_thumbnail_wdg_width => numeric
// Thumbnail Height
srp_thumbnail_wdg_height => numeric
// Thumbnail Rotation
srp_thumbnail_rotation => 'no|cw|ccw',
// How many posts to display. (default: 5)
srp_number_post_option => numeric
// Set the max size of title text
srp_wdg_title_length => numeric
// Set the title text cut mode
srp_wdg_title_length_mode => chars|words|fulltitle
// Set the max size of post text
srp_wdg_excerpt_length => numeric
// Set the post text cut mode
srp_wdg_excerpt_length_mode => chars|words|fullexcerpt
// Select display order. (default: DESC)
srp_order_post_option => ASC|DESC
// Want to randomize posts order? (default: no)
srp_orderby_post_option => rand|no
// Post Offset (to skip current displayed post from visualization)
srp_post_offset_option => yes|no
// Global Post Offset ( to skip an arbitrary number of posts from the beginning)
srp_post_global_offset_option => numeric
// Insert the category ID to filter result posts. (default: -1|'' = none)
srp_filter_cat_option => numeric
// Choose wheter to display only title or both title and excerpt. (default: titleexcerpt = displays both title and text 5)
srp_content_post_option => titleonly|titleexcerpt
// Show post date? (default: yes)
srp_post_date_option => yes|no
// Posts/pages to include?
srp_include_option => numeric
// Posts/pages to exclude?
srp_exclude_option => numeric
// Add nofollow option. (the no-follow attribute is a SEO trick to prevent bots from indexing that link)
srp_add_nofollow_option => yes|no
Example: Show last 5 posts in random order without thumbnail. (PHP mode)
<?php
// Defining widget options.
$args = array(
'srp_number_post_option' => 5,
'srp_orderby_post_option' => 'rand',
'srp_thumbnail_option' => 'no'
);
// Function call.
special_recent_posts($args);
?>
If you wish to use a shortcode, put the following inside any of your post/pages:
[srp]
Shortcodes parameters names are the same of direct PHP call ones, but you have to put them with the '=' sign instead of the '=>' arrow. String values must be enclosed within single/double quotes.
Example:
[srp srp_number_post_option='5' srp_orderby_post_option='rand' srp_thumbnail_option='no']
Requires: 3.0 or higher
Compatible up to: 3.2.1
Last Updated: 2011-10-7
Downloads: 56,139
0 of 4 support threads in the last three weeks have been resolved.
Got something to say? Need help?