Quantcast
Viewing all articles
Browse latest Browse all 11471

Postman76 on "[Plugin: Polylang] Howto change Footer content based on language in use"

Hi,

I'm trying to get footer of my webpage to change it content based on which language is in use.

I noticed topic How to translate/switch specific contents on templates but it seems that this approach is not working with footer.

Currently my approach is created with pll_current_language() approach, but I also tried get_locale() and blog_info() without help. And with this approach both footer options are in visible at the sametime.

Hopefully someone can guide forward with this, at below is my footer code in principle:

<?php $currentlang = pll_current_language($slug);
		if($currentlang=="fi"):?>
			footer content with lang 'fi' comes here
	<?php else if($currentlang=="en"):?>
			footer content with lang 'en' comes here
	<?php else: ?>
	<?php endif; ?>
<?php endif; ?>

http://wordpress.org/extend/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>