split_the_query WordPress Filter Hook
The split_the_query hook is used to modify the SQL query that is used to fetch posts from the database. This hook is called after the query has been split into SQL parts, but before the parts are combined into a final SQL query.
apply_filters( 'split_the_query', bool $split_the_query , WP_Query $query ) #
Filters whether to split the query.
Description
Splitting the query will cause it to fetch just the IDs of the found posts (and then individually fetch each post by ID), rather than fetching every complete row at once. One massive result vs. many small results.
Parameters
Source
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |