添加category_name or cat
在您的arguments
(args)数组。
<div id="mini_stream">
<ul>
<? $args = array(
\'post_type\' => \'post\',
\'posts_per_page\' => 4,
\'category_name\'=>\'html\',
);
$loop = new wp_Query($args);
while($loop->have_posts()) : $loop->the_post();
echo \'<a href="\'.get_permalink().\'">\';
echo get_the_post_thumbnail($post->ID, \'category-thumb\');
the_title( \'<h6>\', \'</h6>\' );
echo \'</a>\';
endwhile;
wp_reset_query(); ?>
</ul>
</div>