help with the code to display thumbnails of recently uploaded images
-
So, I was looking for a code that could retrieve and display a few recently uploaded images and I found the code below in one relevant thread.
<?php $args = array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'posts_per_page' => 2, 'post_status' => null, 'post_parent' => null ); $attachments = get_posts( $args ); if ($attachments) { foreach ( $attachments as $post ) { setup_postdata($post); the_attachment_link($post->ID, false); } } ?>
The topic is closed there so I will ask what I need here. The above code successfully pulls the thumbnails of recent images which is great but I need it to pull custom-sized thumbnail. So where do I put the name of the custom sized thumbnail within the code above?
Also please let me know if I am posting in the wrong forum. Tons of thanks in advance. Cheers !
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘help with the code to display thumbnails of recently uploaded images’ is closed to new replies.