I've inherited a Wordpress project, and my client has a new feature request. For a "portfolio" page template, they want to be able to select an author, which I want to add to the $args in my WP_Query(). I have no idea where in Wordpress or in my theme-file I would be able to add this option to the page editor... Can anyone set me off in the right direction? Codex isn't helping much.

  • 1
    Please add more information. What is 'portfolio'? An actual "Page"? A post type? What?
    – s_ha_dum
    Oct 16, 2013 at 23:26

1 Answer 1


You can write your own query to include or exclude posts from an Author, This page has documentation about the options you can pass to a query. http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters

Here is an example to only get posts from the user $author.

$author_query = new WP_Query('author_name='.$author);

for user 'Amin' : :)

$author_query = new WP_Query('author_name=Amin');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.