获取最新文章,可自定义展现格式

代码如下,当然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>
posted @ 2012-12-20 17:08  leeker  阅读(132)  评论(0编辑  收藏  举报