95 可读性
 将光标移到/点击文章中的句子上,可以查看译文。      显示繁体中文内容    显示简体中文内容

How to call limit post of author on author page (wordpress)
关于作者网页( wordpress ),如何呼叫作者极限帖子

I want to show author's limited posttitles on the author page.i'm using the code outside the wordpress loop to show limited post of author and the code is<?php query_posts('posts_per_page=20');?>. but its showing recent post and i want only posts from author.

How to do this, anybody have idea?

时间:原作者:2个回答

Sample Code

<?php 
$the_query = new WP_Query(array('posts_per_page'=>20,'author'=>$put_author_id_here) );
while ( $the_query->have_posts() ) : the_post();
/* display the post as you do in loop*/
endwhile;
wp_reset_postdata();
?>
原作者:

use

query_posts('posts_per_page=20&author=$ID'); 

or use

query_posts('posts_per_page=20&author_name="admin"'); 
原作者:
...