Yes there is, the_posts
gets called just after the posts have been selected from the database and it passes an array of $posts
as a first parameter and the $wp_query
object as second parameter to your hooked function.
Related Posts:
- WP_Query – How to get all posts of specific days of week by custom field date?
- Track write actions to the database
- Filter WP_Query output before it is accessed (pre_get_posts)?
- Use REGEXP in WP_Query meta_query key
- How to list some posts first in the loop based on post id
- Whats the difference between post_limits and pre_get_posts?
- How to add taxonomy filter on the query fly?
- Hook/action after WP_Query gets posts to query custom tables for post-related meta
- WP_Query – filter or directly?
- What is the most efficient way of querying posts based on visits and date for current day?
- Changing Posts Per Page and offset with pre_get_posts
- ajax category filter
- How to order posts tag by tag?
- Overriding The Loop with filter or hook
- Custom query incorrectly returning everything [closed]
- WP Rest API v2 return posts with specific tag
- RSS feed with specific keyword
- Is there an action/filter called when WP_Query->query is finished and assigns posts
- How to filter sql only for a specific post type
- Ignore a filter on the media library
- How to support multiple search terms query within one process?
- How to get any tag ID
- Display different number of posts from one category on the different pages
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- Removing posts from the returned wp_query. Cannot use object of type WP_Query as array
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- What’s the point of the query_vars filter?
- Including only current user’s posts in search
- Refine/Filter WP_Query Posts with jQuery or Ajax
- Use ‘parse_query’ filter to show posts that from multiple criteria
- How to apply filter inside a single wp_query?
- What is considered a default query for the request filter?
- Using apply_filters(‘the_content’, $custom_query->post_content) alters output
- Modifying the Search Results
- When to add_filter() to Custom Query
- Order by custom table and multiplication
- Query total number of posts
- How to add post_distinct filter to WP_Comment_Query?
- Using Ajax to load more posts | Help me change the wording on my button to notify the user
- How to use filter hook “the_posts” with a function that refers to $this?
- How to create a WordPress Post Filter that users can use to filter posts by year?
- add_filter() depending on search term
- query_vars filter not working even though query string parameter is present
- How do I run through a WordPress loop called from a filter function?
- add_actions called from functions.php not returning good values
- Order by title without taking into account ‘the’
- How can I filter by slug depending on language selection
- wp_query ‘s’, search filter with pagination is not working
- How to filter, restrict and return posts based on custom user meta information
- Bypass “supress_filters” in WP Query
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- How to use the query hook/filter?
- Filter posts in category archive page by year using a dropdown
- Set global $wp_query/$post variable for dynamic page generation
- Display filtered results into custom page
- WP_Query ignoring tax_query when is_singular
- Applying posts_clauses filter to specific queries only
- Add class to first post in custom loop using post_class filter
- WP_Query with different postmeta filter for each categories
- Slow WP_Query with ‘OR’ on meta_query
- Add posts to WP Query object
- Filter Posts from the Main Query
- How to alter local query, not main query [duplicate]
- How to filter a query by date in a shortcode?
- How can I allow sticky posts but cap the query to 1 post?
- how to access query string in wordpress?
- How can I override one post and make it display content for another post?
- Filter Custom Taxonomy Posts
- Include posts from some categories while excluding from others
- Changing the default wp_search_stopwords
- Filter post query to only show direct children of category
- Is it possible to add an argument to a custom function added to a filter hook?
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- I need help using pre_get_comments to limit comments in the comments admin screen
- Change AJAX filter from POST to GET for URL Parameters
- Using post_where filter only on main query NOT sidebard new WP_Query
- Filtering posts by archive showing all years
- Multiple wp_query on archive page
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Remove post type filter added by the plugin in the final query
- Filtering by multiple conditions in the loop
- relation OR instead of AND – Filtered term ID’s in loop
- Can’t order the query result as given posts id’s array
- filter posts by meta key with pagination
- Why does apply_filters behave different inside and outside a loop?
- Custom post type – filter content by custom meta box content
- Elementor posts custom query based on tag [closed]
- meta_query weird behaviour, static int will work, but not user data
- Filter sub-category from checkbox form
- Display posts ONLY from the current logged in user and current week/year/month Elementor posts
- My combination of ‘post_type’ and ‘tax_query’ not working?
- Custom meta_query order for Elementor based on post meta key [closed]
- How to add a “base” filter for all posts visible to visitors on the site?
- Add metabox if there is at least one post available
- the wp_post_update isn’t working all the time
- Custom filter from post meta
- WordPress – Form does not filter the results of taxonomies
- add action for wordpress query at a specific position
- Query Posts | Combining multiple form inputs into query arguments to generate one filter result