Hi
You need to use this pll_the_languages function in the php file where is the header social icons.
Put the pll_the_languages function inside the same <div></div> of the header social icons.
For the CSS it’s better to ask advice from your theme author.
To remove the bullet and display the flags horizontally, see the FAQ: How to display the widget flags horizontally? and How to display remove bullets in front of the flags?
Thread Starter
redsea
(@redsea)
thank u
I found more information about this but not clear
please help me am beginner give me the code and tell me were I will add it and the name of the file and the line (location)
and also css code and were I will add it
same line of the social media icons
thank you
Open your header.php. Then put this code, it will only display the flags, if you want display the names put 1 instead of 0:
<ul id="flags">
<?php pll_the_languages(array('show_flags'=>1, 'show_names'=>0)); ?>
</ul>
inside this div:
<div class="header-social">
<?php
do_action('encrypted_lite_social');
?>
<ul id="flags">
<?php pll_the_languages(array('show_flags'=>1, 'show_names'=>0)); ?>
</ul>
</div>
<?php endif; ?>
</div>
You should use a child theme, because at the next update your header.php with your modifications, will be delete.
After that go in your style.css and use the #flags to remove the bullet, and display the flags horizontally.
Thread Starter
redsea
(@redsea)
thanks thanks
its working
but I need only flags horizontally and only flag no text
also its coming in new line not same line of social I want on same line of social, I think from css but how
this I did not understand
After that go in your style.css and use the #flags to remove the bullet, and display the flags horizontally.
Really appreciate your patience
only flag no text
‘show_names’ => displays language names if set to 1 (default: 1). See the doc: https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
but I need only flags horizontally
It’s the CSS part, that you must handle in the style.css. In the style.css create the #flags. Then help you with the FAQ to display your flags horizontally: How to display the widget flags horizontally? and How to display remove bullets in front of the flags?
also its coming in new line not same line of social I want on same line of social, I think from css but how
I’m not a CSS expert, you should ask to your theme author to how to do that. Specify him that you have created a #flags to manage your flags in the style.css.
Thread Starter
redsea
(@redsea)
I make it
‘show_names’=>0)); ?>
I try also 1
also language name coming
thanks
Try to paste again this code.
<ul id="flags">
<?php pll_the_languages(array('show_flags'=>1, 'show_names'=>0)); ?>
</ul>
Sorry, I can’t help more since I tested it with your theme and it works for me (last version of your theme + last Polylang version).
Thread Starter
redsea
(@redsea)
thank you
thank you
thank you