Viewing 5 replies - 1 through 5 (of 5 total)
  • DeathAngelDaemon

    (@deathangeldaemon)

    Just add the following code (for a dropdown language switcher)

    <?php pll_the_languages(array('dropdown'=>1)); ?>

    for example in the header.php of your theme to put it at the very TOP of your site.

    And have a look at the documentation:
    http://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/

    There you can find other parameters to change the switcher.

    Thread Starter sopitoma

    (@sopitoma)

    I get like fatal error:

    Fatal error: Call to undefined function pll_the_languages()

    DeathAngelDaemon

    (@deathangeldaemon)

    That looks like the Plugin “polylang” is de-activated.
    Maybe you can test, whether the plugin is activated.

    <?php
    if( class_exists('Polylang') && function_exists('pll_the_languages') ) {
        return 'Yeah, the plugin is activated and should be displayed!';
    } else {
        return 'FAIL!';
    }
    ?>

    If you get the second return, please have a look at your pluginlist and activate polylang if it is not. Otherwise there is maybe another error.
    Where have you put in the pll_the_languages(); function?

    Thread Starter sopitoma

    (@sopitoma)

    Yes! you are right, it was deactivated. sorry 🙂
    So now its on top, but left side, how to change to right side?

    And if I change to flags, then other flags goes under each other and language name shows, how to leave only flags and no names? and change to horizontal position, I have tried code:
    .lang-item {
    display: inline;
    }

    but it don’t work for flags, for names it works.

    DeathAngelDaemon

    (@deathangeldaemon)

    Do you have a solution for that or do need any help?

    If so, thats seems to be a kind of CSS changes. Can you post the URL of your site, so I can have a look at myself?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add swichers at the very TOP of site’ is closed to new replies.