代码如下,当然class可以自定义了,:-D
1
2
3
4
5
| <div class="ilatest">
<?php $new_posts = get_posts('showposts=8');foreach( $new_posts as $post ) : ?>
<a href="<?php the_permalink(); ?>"><img src="http://www.tdplayer.cn/wuli/images/<?php echo get_post_meta($post->ID, 'swf', true); ?>.gif" class="gameimgs" alt="<?php the_title(); ?>" /></a>
<?php endforeach; ?>
</div> |
转载于:https://www.cnblogs.com/wpsnippet/archive/2012/12/20/2826707.html