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

dr_tracker on "[Plugin: Polylang] Newbie question about pll_current_language"

$
0
0

Hi guys, please forgive me for this question that might have been already asked but I have already searched and have not been able to make this work.

The thing is, I want to use a shortcode according to the current locale, pointing to different contact forms.

Tried this:

<?php

 if ( pll_current_language() == 'es' ) {

	 [shortcode es]
        }
        elseif ( pll_current_language() == 'en' ) {
	 [shortcode en]
        }

?>

Please let me know if this is possible and if I'm doing it right.

https://wordpress.org/plugins/polylang/


Viewing all articles
Browse latest Browse all 11471

Trending Articles



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