Disable changes on search-query
-
Hi,
I have noticed that TranslatePress affects searches in languages other than the main language. This may be suitable for many projects – for what I am working on it is not desired.
I would like to disable this hook:
$this->loader->add_filter( 'pre_get_posts', $this->search, 'trp_search_filter', 99999999 );
My attempt to do this is in the functions.php of my child theme:
function custom_remove_trp_hooks( $loader_obj ) { $loader_obj->remove_hook( 'pre_get_posts' ); } add_action( 'trp_before_running_hooks', 'custom_remove_trp_hooks', 10, 1 );
Unfortunately, this is executed AFTER TRP_Hooks_Loader::run(), so it doesn’t take effect at all.
What can I do to disable the hook?
Thanks in advance ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Disable changes on search-query’ is closed to new replies.