This plugin allow you to display your post in pages or posts using shortcode
http://wordpress.org/extend/plugins/category-post-shortcode
How to use
just put this shortcode in your post or pages
[ cat totalposts="3" category="1,3" thumbnail="true" excerpt="true"]
make sure there is no space between [ and cat. I just put a space to show the code .
Shortcode Attributes
totalposts - your total number of post to display. default is -1
category - category id. use comma , for multiple id
thumbnail - set true if you want to display thumbnail. default is false
thumbnail_height - image size for the thumbnail. default is 130
thumbnail_width - image size for the thumbnail. default is 130
excerpt - set true if you want to display excertp. default is true
orderby - your post will order by . default post_date . check http://codex.wordpress.org/Template_Tags/get_posts for detail
Sample Output
thumbnail
create custom field key as thumbnail-url and put your thumbnail url in the value area
![]() |
| From ibnuyahya.com |
Styling
style at your own in style.css
example
.cat-post{
width:100%;
}
.cat-post-list{
display: block;
margin-bottom: 20px;
position: relative;
}
.cat-post-images{
float:left;
width:140px;
display:block;
}
.cat-content{
width:350px;
float:right;
}
.cat-post-title{
display: block;
width:100%;
}
.cat-clear{
clear:both;
}

JLee 10:45 pm on November 11, 2010 Permalink |
Hello,
This plugin is exactly what I was looking for and made me extremely happy when I stumbled upon it. However I’m not sure why but the thumbnails are not being displayed even though the custom field is correct. I’m using the WordPress version 3.0.1. Can that be the reason?
JLee 10:49 pm on November 11, 2010 Permalink |
Hello,
It’s me again. The reason was the shortcode. I pasted the code directly and haven’t checked it but the ” marks were somehow different. Thank you for creating and sharing such a wonderful plugin!
admin 8:47 am on November 12, 2010 Permalink |
hi glad to hear you manage to use my plugin
Kermit Woodall 11:47 am on December 8, 2010 Permalink |
Any chance this would support pagination so a reader could scroll from page to page of posts?
admin 9:56 am on December 11, 2010 Permalink |
yeah. that’s a good idea but currently i have no plan to do that.
Rahim 6:34 pm on December 10, 2010 Permalink |
I have pasted that short code on http://www.bonfriends.org/ask-super-sis/ (at the end of page) but I can see post from more than the mentioned posts. I only want post from the category “Relationship Talk”
Please help
admin 9:51 am on December 11, 2010 Permalink |
Hi Rahim,
Have you specify category id for “Relationship Talk” in the category option?.
Major 5:15 am on February 6, 2011 Permalink |
I am getting everything to work except the images showing up. And for the image, will it be one image for all category post or will you be able to set a different image per post in the category
admin 9:03 am on February 7, 2011 Permalink |
Hi Major,
You need to create custom field with the “thumbnail-url” name. The “thumbnail-url” value is your thumbnail image url. For the image, it will show thumbnail for individual post.
matjaz 9:34 pm on November 13, 2011 Permalink |
i would realy like to know how to link a thumbnail-url picture, to a post
thanks
ibnuyahya 9:44 am on November 14, 2011 Permalink |
There is a panel on the right top of your screen when you on add/edit post.. says “Screen Option”. Click on that and tick “Custom Fields” checkbox. You will see “Custom Fields” panel at bottom of your post editor. Enter new custom fields name as “thumbnail-url” and your thumbnail url in the value text box.
ile 6:42 pm on November 15, 2011 Permalink |
hi! thanks for the useful plugin. One information, i would like to change thumbnail-url with the default Post Thumbnail Image (http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/). I’ve tried changing category-post-shortcode.php, like this:
if($thumbnail == ‘true’) {
$output .= ‘ID, ‘thumbnail-url’,true).’” />’;
}
with
if($thumbnail == ‘true’) {
$output .= ‘ID, ‘thumbnail’,true).’” />’;
}
Probably wrong… What do you suggest me to do? Thanks!
ibnuyahya 7:52 pm on November 15, 2011 Permalink |
if you changed your code from ‘thumbnail-url’ into ‘thumbnail’, make sure your’re using ‘thumbnail’ as your variable in post’s custom field.
ile 7:17 pm on November 15, 2011 Permalink |
p.s. i’ve also inserted example style in my style.css. i’ve tried to change background color, but nothing…