我想我已经明白了。这是我使用的代码this thread 在WP支持论坛上。只需更换()<?php the_author_posts_link(); ?>(
) 使用您想要使用的任何摘录代码。瞧!
<?php
//list 5 latest authors
$authors = array();
$count = 0;
$args=array(
\'post_type\' => \'post\',
\'post_status\' => \'publish\',
\'posts_per_page\' => -1,
\'caller_get_posts\'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts() && $count < 5) : $my_query->the_post();
$author_id=$my_query->post->post_author;
if (!in_array($author_id,$authors)) { ?>
<?php the_author_posts_link(); ?>
<?php $count++;
$authors[]=$author_id;
}
endwhile;
}
wp_reset_query(); // Restore global post data stomped by the_post().
?>