Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress:列出作者';s在author.php中的帖子_Wordpress_List_Posts_Author - Fatal编程技术网

Wordpress:列出作者';s在author.php中的帖子

Wordpress:列出作者';s在author.php中的帖子,wordpress,list,posts,author,Wordpress,List,Posts,Author,我想在author.php模板中列出作者最后的10篇文章。 我使用了以下代码: <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> <?php endwhile;?> 但我只能看到当前作者的最后一篇文章。有什么帮

我想在author.php模板中列出作者最后的10篇文章。 我使用了以下代码:

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

  • 但我只能看到当前作者的最后一篇文章。有什么帮助吗?

    这是代码

      <?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;?>
    
    
    
  • 这是代码

      <?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;?>
    
    
    
  • Multi-post:Multi-post: