WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Adding custom parameters to output of pll_the_languages()

[Resolved] Adding custom parameters to output of pll_the_languages()

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    @chouby

    You can use the filter pll_the_languages_link to filter the url returned by Polylang and set it to teh correct value for you.

    Hi Chouby!

    I tried it with the pll_the_language_link filter earlier today, but it didn’t work. Now I tried it again and it works perfectly:

    add_filter('pll_the_language_link', 'language_link_query_args', 10, 2);
    function language_link_query_args($url) {
    	foreach($_GET as $key => $value){
    	  $url = add_query_arg($key,$value,$url);
    	}
    	return $url;
    }

    Thanks again for your great plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Adding custom parameters to output of pll_the_languages()’ is closed to new replies.