
-
AuthorPosts
-
February 26, 2016 at 10:14 am #589631
Hello,
I would like to add the polylang language switcher bar on top of my “coming soon” page which is based on the blank – Template. Therefore I need to add the follwoing code at the very top, but only if the “blank”-template is used, because otherwise the bar is placed on the menu.
Can you advice which files I do have to modify supposed that I am using an enfold child theme?
February 26, 2016 at 2:23 pm #589805Hi Infinity!
You can add Code Block element to your page and add your code inside it or text tab of text block element :)
Regards,
YigitFebruary 29, 2016 at 8:41 am #590603Hello Yigit,
I tried to add the follwoing code but it does not get interpreted:// Language switcher if (function_exists('pll_the_languages')) { ?> <div class="my-lang"><?php pll_the_languages(array('show_flags'=>1,'show_names'=>0, 'hide_if_empty'=>1)); ?></div> <?php }
February 29, 2016 at 3:35 pm #590821Hey!
Please try using a plugin such as this one – https://wordpress.org/plugins/insert-php/
If that does not help, please elaborate on the changes you would like to make as i have a feeling that i may have not understood you correctly :)Cheers!
YigitFebruary 29, 2016 at 5:08 pm #590947Hi,
please have a look at my website to see that the php code is not evaluated. I activated the plugin of course and used the code element.
What I am trying to do is to add language flags to on the very top of my website. While I already found a solution for the default theme (add the flags to the menu – see 2nd link) I can’t get it to work for the “no header no footer” theme because I have no menu where I can place the flags on to and I don’t know which files I do have to modify.
Regards
March 3, 2016 at 2:24 pm #592616Hey!
Please try adding following code to Functions.php file in Appearance > Editor
function avia_poly(){ $output = pll_the_languages(); return $output; } add_shortcode( 'polylang_switcher', 'avia_poly' );
and then add following shortcode into your page with blank page template
[polylang_switcher]
Regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.