Jus add the parameter 'author__in'=> array( 2, 3, 5 )
to $args
and pass the author ID or IDs. You’ll get the results.
$args = array(
'author__in'=> array( 2, 3, 5 ), // array of authors IDs you like to include
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
And I don’t think you need the $my_query = null;
to nullify the variable before declaring it.
Related Posts:
- Search posts by post author name
- On WordPress Search, how to search post from Author meta also
- How to hide meta from search result only on pages?
- Including categories in search results
- Prevent Authors from viewing each others Posts
- Display Random Author with Details in Sidebar
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- WordPress: How to get the current logged in author page URL?
- How to add editor’s name to entry meta byline?
- Query posts distinct authors
- Restrict the Number of Posts an Author can Publish (over time)?
- Search not working with title and content
- Show the title of the latest post by author
- Get current users post URL?
- Filter posts by author and category simultaneously
- how to hide specific post from google search
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- Post author is changed to admin after his post is modified by admin
- Search widget breaks when using multiple loops?
- Get all posts by post_author
- How can I control multiple editing of wordpress posts?
- Multiple authors for single post without plugin
- How can I get all posts data from within a paginated search result?
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Author must complete profile info before they can publish a post?
- WP rest api returns 404 only when author param is used
- How can I list random authors from current post category?
- pagination hook doesn’t work with search results
- Search for posts based on their url in the admin?
- wp_query ‘s’ parameter does not work with custom post type
- Differentiate between posts and pages in search results
- Private Posts/Pages & Search
- Display number of posts via adress bar?
- How can I show wordpress posts based on author?
- Limit posts per author role (excluding admin) in home page
- Guest Author – How to display posts on /author/ archive page
- How to give capability (publish contributors posts) to author role?
- Show posts by a custom post author
- Search results posts_orderby and ID
- Getting the current author (it has changed) of a post, not the original author
- Showing author page if user has no post
- How do I change the core post search algorithm? Where is it found/constructed?
- Display Notification Bar on Header on Certain Post Count
- obtain the author id given the post id
- Show comment number per author per day
- Get all comments of author’s posts
- (solved) getting post author’s user role
- How to add add more properties to WP_Post object in search results loop
- static landing page leading to author specific pages w/ “live” content
- If contributor has published 2 or more posts then show otherwise hide
- All Posts Linking to Author Posts directly
- Total number of posts in query (category/tag/author/search results/main page…)
- Change post author without using wp_update_post()
- See if a post has a specified tag
- How to get the ability to change the author of a post
- Echo Text If User Is Logged in But NOT the Author of post
- Only allow posts with a specific term to only be viewed by other authors with the same term in their post
- How to limit author related post listing ?
- Restrict displaying posts to the poster itself (in Back-end)
- Get total post from an author
- Send email to author of post on post submission
- How can I set a maximum allowed post size and number of posts submitted?
- Get x recent posts by author?
- Get latest author posts inside the loop
- Why does WordPress search returns same number of results for every search query?
- Author Avatar as default first image
- Hide parts of the post content after typing it’s name or searching it by category
- search content of pages and list in wp-admin
- Cannot select certain authors for posts after import
- Display message depending on capability outside loop
- How do I disable the “by author” hyperlink on posts?
- Authors’ Links on Homepage Not Going to Author Post Pages
- adding my posts (author posts) in menu
- Prevent 404 of Author pages without posts
- Will multiple category descriptions effect my search engine optimization?
- how to show comments only author which send own posts in wordpress
- search form for custom fields
- Author post count in category
- Search results with pagination not working
- How to show only homepage in google results instead of privacy, contact pages
- Change of author not updating
- Limit Post Creation Count by Author or Role
- How to search through “post title” and “tags” using WP_Query?
- Display post by Random Authors on Page Refresh
- Numbering author posts in posts query
- Changing the Category for all posts of an Author
- List of authors posts minus very latest
- Display result of custom form
- show latest authors blog post
- Getting posts from multiple users?
- Display the current post author and his url in the post header
- How can i retrive the movies, trailers, news in a single page using search
- Show last post of employee in his profile page
- Related posts by searching post tags of single post as terms
- Notify Author of the post if admin deletes his post and perform some function
- how to show all type of author posts in author page (SOLVED)
- How to show total view count across all posts for an author
- Add author section on Author archive posts
- users followin the blog post author