WordPress Selected posts on home page based on Authors

We can show posts based on only selected authors from wordpress users. For this we can use “query_posts” function. Just Goto Appearance –>  Editor –> select page Index.php and place the below code and see.

Author Parameters

You can also restrict the posts by author.

  • author=3
  • author=-3 – exclude author id 3 posts
  • author_name=Harriet

Note: author_name operates on the user_nicename field, whilst author operates on the author id field.

Display all Pages for author=1, in title order, with no sticky posts tacked to the top: