How can i show the last 2 post attachments in my category template?
I tried the following
But i need to show the last 2 post image attachments
if i have the following code
function show_all_thumbs() {
global $post;
$post = get_post($post);
/* image code */
$images =& get_children( 'post_type=attachment&post_mime_type=image&output=ARRAY_N&orderby=menu_order&order=ASC&post_parent='.$post->post_parent);
if($images){
foreach( $images as $imageID => $imagePost ){
unset($the_b_img);
$the_b_img = wp_get_attachment_image($imageID, 'thumbnail', false);
$thumblist .= '<a href="'.get_attachment_link($imageID).'">'.$the_b_img.'</a>';
}
}
return $thumblist;
}
to display
then how can i limit the output of images displayed