post_author
is not a valid parameter for get_posts
. You really need to look at WP_Query
‘s argument list to see that, as get_posts()
is really just a wrapper around that class.
- author (int) – use author id.
- author_name (string) – use
‘user_nicename’ (NOT name).- author__in (array) – use author id (available
with Version 3.7).- author__not_in (array) – use author
id (available with Version
3.7).http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters
What you want is author
without the post_
part. Try that, and it should work.