2012-10-31 43 views
1

我想在author.php模板中列出作者的最後10篇文章。 我用這個代碼:WordPress的:在author.php列出作者的帖子

<?php while (have_posts()) : the_post(); ?> 
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> 
<?php endwhile;?> 

但我只能看到當前作者的最後一個職位。任何幫助?

+0

多後:http://wordpress.stackexchange.com/questions/71127/list-authors-posts-in-author-php – fuxia

回答

1

下面是代碼

<?php global $query_string; 
     query_posts($query_string . '&posts_per_page=10'); 
     while (have_posts()) : the_post(); ?> 
      <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> 
<?php endwhile;?> 
相關問題