Polylang language link: strip FacetWP variables

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

// Add the following to functions.php

add_filter( ‘pll_translation_url’, function( $url, $lang ) {
if ( false !== ( $pos = strpos( $url, ‘?’ ) ) ) {
$url = substr( $url, 0, $pos ); // strip out the “?” and everything after
}
return $url;
}, 10, 2 );

{{/gist}}