Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $recentposts = get_posts('nopaging=1');
- $thumbs = array();
- if( count( $recentposts ) ) {
- foreach( $recentposts as $p ) {
- $thumbs[] = '<a href="' . get_permalink( $p->ID ) . '">' . get_the_post_thumbnail( $p->ID ) . '</a>';
- }
- }
- echo '<ul class="gallery">';
- foreach( $thumbs as $thumb ) {
- echo '<li><span>';
- echo $thumb;
- echo '</span></li>';
- }
- echo '</ul>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement