First, the author parameter is parsed and appended to the author__in and author__not_in query parameters.
Then author__in or author__not_in array is processed. These can be arrays created from author parameter or arrays passed as query parameteres author__in / author__not_in or created from a mergion author parameter with author__in / author__not_in parameters.
Parameters author__in and author__not_in are mutually exclusive, so you can use only one of them. If both are given, then author__not_in will be used.
Finally, the author_name parameter is processed and added to thewhere clause. Although theoretically it can be used with any of the other parameters, the effect will be the same as if only author_name was used.
Related Posts:
- author.php with ACF and CPTs
- Query to return maximum of one post per author
- Show only oldest post by author
- Function to check if author has posted within the last x days
- Show one post per author and limit query to 8 posts
- Pagination 404 errors for author posts query on author.php
- Only display authors who have posts
- Get List of all the Authors
- How can I display list of all posts from a specific author, with publish dates in the future, on an author archive page (author.php)?
- Get authors by term id or slug
- Dynamic User Id
- Custom Query by Author field and meta
- slow WP_Query for non-admin user
- WP_Query (list) posts according to author’s custom field
- Exclude some authors from query
- Get author if post has multiple authors
- All posts returned when author of 0 is queried
- Posts in loop all show the same author when there are many authors
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Display if author page is author page of current user
- Exclude authors IDs from WP_Query
- query post by author gender
- How can i show pagenavi in my author.php?
- wp query to use both author id and meta_query
- Counting instances of words in the results of a post query
- Query posts by post type, author and post meta
- Get authors list and sort them by recent posts
- query all posts published by certain user id
- WP Query get posts by specific author IDs if one of several logged in authors
- wp_query with parameters
- Query posts with “non set” meta value
- Add filter post_where and passing post_type argument
- WP_Query infinite Loop
- Limiting number of related posts
- Ordering a mysql style datetime stamp with meta_query
- Advanced WP Query and/or
- 2 wordpress loops showing 1 post from same post type – how to avoid showing the same post?
- WP Query – order posts by meta field first and then order the rest
- Reusing content from front page on sub page
- Get Child Page IDs by Parent ID
- Wildcard search in WP Query
- Pagination works in custom query loop but it doesn’t work in shortcode
- Especific order by Custom Field Values in WP_Query
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Related Posts Excluding Certain Categories
- Pagination for custom loop on custom page template is not displaying anything
- Display posts by tag
- Unlimited Page Sitemap Link
- Writing less unnecessary code with WordPress
- query single random post works localhost, not on live site
- Custom taxonomy in WP_Query not working
- Add category to my get_post query
- How to sort by most watched in X days/months
- Replace wp_query with wp_user_query
- How can I use arrays and a foreach to generate many lists with WP_Query?
- How to use custom page for all posts with custom url, call another directory?
- Pagination repeating posts on search results
- WP_Query breaking the loop in a nested loop
- Change normal grids to masonry grids
- order posts by a secondary query that counts items
- How to use wp query in my custom page without including header and footer in wordpress
- How to get user avatar via WPDB
- One of two similar WP Query is very slow
- WP_Query, ACF field and array
- cron job for custom post type not working since WordPress 5
- WP_Query – multiple orderby with a rand field, doesn’t work
- What does $temp do?
- query not working for ordering by meta_key
- Woocomerce – Order products by float attribute in archive pages
- Insert wp_query after the_content with plugin (filter the_content won’t work)
- Query 3 meta_key and orderby
- Is instantiating WP_Query not possible within an admin Ajax call?
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Custom query using WP_Query is not working
- Calling body_class and wp_nav_menu for a different post
- Category Archive not working for pages
- Using the same WP_Query for shop and widgets in WooCommerce shop
- Order posts by more than one variable (meta_key and publish date AND time)
- How can I get all the posts that are related with a specific taxonomy term?
- Showing Children of page by name
- WP_Query for liked posts is showing all posts if none are liked
- Custom query on custom table fails
- Get closest event where meta_key field is an array
- Can’t get the_content to show
- Custom shortcode not displaying categories and correct date
- Set right order for query that returns posts based on two custom fields
- Sort by name – second wp_query
- How to query post ids liked by the Author
- Meta_query weird behaviour
- Manipulating a query
- Modify query after meta value
- How can I filter a query by post id?
- Incorrect taxonomy ID assigned to post with custom query
- Splitting query results, on the frontend, into separate sections based on meta value without multiple loops?
- How WP determines archive page vs single page?
- Sort wp_query of two post types using meta datefield for one and date for the other – possible?
- wp_query returns all posts even with post__in and posts_per_page
- Get related posts from tag otherwise from category (Ajax Load More plugin)
- WP_Query equivalent of SQL UNION ALL