Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

Chouby on "Search results should show only Dutch or English posts (listings)"

$
0
0

Maybe this:

global $polylang;
if (isset($polylang) && class_exists('Polylang_Core') && $polylang instanceof Polylang_Core && isset($polylang->curlang)) {
	$join .= " INNER JOIN $wpdb->term_relationships AS pll_tr ON pll_tr.object_id = p.ID";
	$where .= $wpdb->prepare(" AND pll_tr.term_taxonomy_id = %d", $polylang->curlang->term_taxonomy_id);
}

Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>