From 84b23a37566fe3b3055eac483cc67479b1f7f1ce Mon Sep 17 00:00:00 2001 From: arttu Date: Mon, 11 Mar 2019 15:09:06 +0200 Subject: [PATCH] add language query to wp_query just in case --- content/themes/custom/models/search.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/themes/custom/models/search.php b/content/themes/custom/models/search.php index 929ad22..655b995 100644 --- a/content/themes/custom/models/search.php +++ b/content/themes/custom/models/search.php @@ -141,6 +141,15 @@ protected function get_post_list( stdClass $params ) { 'compare' => '=', ], ], + // Manually add language query + 'tax_query' => [ + [ + 'taxonomy' => 'language', + 'field' => 'slug', + 'terms' => get_short_locale(), + 'include_children' => false, + ], + ], ]; // Allow searching without a search term