WordPress filter hook · part of WordPress core
split_the_query
A WordPress core filter that 9 plugins also fire themselves, running on 24K+ sites between them.
“Filters whether to split the query.”
How to use split_the_query
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'split_the_query', function( $split_the_query, $object ) {
// Change $split_the_query here.
return $split_the_query;
}, 10, 2 );Argument names come from GamiPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
9 plugins that fire split_the_query
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
GamiPress10,000+ installs
apply_filters( 'split_the_query', $split_the_query, $this )libraries/ct/includes/class-ct-query.php:670 -
ALD8,000+ installs
apply_filters( 'split_the_query', $split_the_query, $this )includes/ali-product-query.php:1167 -
AutomatorWP6,000+ installs
apply_filters( 'split_the_query', $split_the_query, $this )libraries/ct/includes/class-ct-query.php:670 -
ChinaDS100+ installs
apply_filters( 'split_the_query', $split_the_query, $this )inc/taobao-post-query.php:1207 -
ShortLinks Pro100+ installs
apply_filters( 'split_the_query', $split_the_query, $this )libraries/ct/includes/class-ct-query.php:670 -
HANDMADE40+ installs
apply_filters( 'split_the_query', $split_the_query, $this )includes/class/handmade-post-query.php:1027 -
BBForms20+ installs
apply_filters( 'split_the_query', $split_the_query, $this )libraries/ct/includes/class-ct-query.php:670 -
WhatAvatar10+ installs
apply_filters( 'split_the_query', $split_the_query, $this )libraries/ct/includes/class-ct-query.php:670 -
Gospel Resource HubFewer than 10 installs
apply_filters( 'split_the_query', $split_the_query, $this )includes/class-grh-query.php:1163
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.