<?php
$cats = get_categories();
foreach ( $cats as $cat ) {
query_posts( ‘showposts=2&cat=’ . $cat->cat_ID );
?>
<div class=tdiv>♥<?php echo $cat->cat_name; ?><a href=”http://81.70.49.155/index.php/category/<?php echo $cat->cat_name; ?>/”>…更多</a></div><div class=bdiv></div>
<?php while ( have_posts() ) { the_post(); ?>
♦[<?php the_time(‘Y-n-d’); ?>] <a href=”<?php the_permalink(); ?>”><?php the_title(); ?>…<?php the_views(); ?></a></br>
<?php } wp_reset_query(); ?>
<?php } ?>