幫朋友寫的,順便放在這裡mark一下好了。 以下代碼實現獲取最新10篇日誌及其100×100像素的特色圖片。
1<?php query_posts('posts_per_page=10'); if (have_posts()) : while (have_posts()) : the_post(); ?>
2
3<?php if (has_post_thumbnail()){the_post_thumbnail(array(100,100)); } ?> <?php the_title(); ?>
4
5<?php echo get_the_date(); ?>
6
7<?php endwhile; endif;?>
COMMENTS (7)