Created
October 23, 2019 16:05
-
-
Save ArnoutPullen/0343198043fcc3858a64964ed8ef5bdf to your computer and use it in GitHub Desktop.
Integrate Toolset Views with ElasticPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Integrate Toolset Views with ElasticPress | |
* https://github.com/10up/ElasticPress#supported-wp_query-parameters | |
* https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query | |
*/ | |
function ep_toolset_integration( $query, $view_settings, $view_id ) { | |
$query['ep_integrate'] = true; | |
return $query; | |
} | |
add_filter('wpv_filter_query', 'ep_toolset_integration', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment