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

morten66 on "[Plugin: Polylang] CLS - pll_the_languages - need seperate links for languages"

$
0
0

Thank you Chouby for so fast and good answer:) You are amazing programmer! You just gave me what i needed, i've search for simpler solution, but this works even better :)

This line of code gave me possibility to add bootstrap classes for button languages: printf('<div class = "%s" ><a href = "%s" >%s</a></div>' so you understood my problem very well :)

I have just added (array('raw' => 1));

Here is the code if someone will be searching for this solution:

<?php $languages = pll_the_languages(array('raw' => 1));
foreach ($languages as $language){
printf('<div class = "%s"><a href = "%s" class="btn btn-default lang-btn">%s</a></div>',
'lang-' . $language['slug'],
$language['url'],
strtoupper($language['slug']
);
}
?>

Thank You Chouby one more time:) Your plugin is so wonderful!
Best Regards
Morten


Viewing all articles
Browse latest Browse all 11471

Trending Articles



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