Support » Plugin: Polylang » [Plugin: Polylang] I have no widgets on my theme

  • Resolved saule

    (@saule)


    Hello,
    I would like to use your plugin but I do not have widgets on my theme – its one text column only.
    Would you please give a code to insert in my theme?

    And another one question. My site is pages only will I be able to find the translated pages if they converts to posts (somebody on the forum said so), but I have no posts only few pages in header navigation!
    Please let me know.
    Thank you.

    http://wordpress.org/extend/plugins/polylang/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Chouby

    (@chouby)

    You can include the following code to display the list of languages in your theme :
    do_action('the_languages');

    The bug you are referring to is now corrected in 0.3.2. You can translate pages just as you would do for posts.

    no option to hide the current language? guess i’ll adjust the plugin to add some classes for the lang button

    btw, the whole ul of the plugin’s language changer should have a class

    line 718 of polylang.php:

    $output = "<ul class='polylang'>\n";
    added a class for the ul

    line 723:

    $output .= "<li class='".esc_attr($language->slug)."'><a href='$url'>".esc_attr($language->name)."</a>\n";
    added a class for the item, using the slug name of the lang

    now you have full css control

    i cant edit older replies? well anyway now i have it hiding the current language

    surround the previous output with a little if statement

    if ($language->slug != $this->curlang->slug) {
    	$output .= "<li class='".esc_attr($language->slug)."'><a href='$url'>".esc_attr($language->name)."</a></li>\n";
    }

    you can of course alter this to add a class to the selected language or something

    hello, thank you for the plugin.
    the topic I have a supplementary question:
    without sidebars in the header I would like to put two, maybe three flags.
    I can count on the support (syntax)
    Once again, thank you very much!

    I’m sorry,
    I read the documentation!
    Thank you very much!

    but … does not work
    ;(

    I would like to display the flag horizontally in the header, very please with example code
    Very, very Thanks!

    Plugin Author Chouby

    (@chouby)

    The appearance is managed by the theme. You will have to edit your style.css file. Look at this post where I already explained how to do.

    when it comes to inline Thanks, it works.
    unfortunately I can not display the flag:
    <?php do_action(‘the_languages’,’show_flags’); ?>
    widget displays the flags, but I only have text header
    Help?

    but in header i only have text names …

    Plugin Author Chouby

    (@chouby)

    You don’t use the right syntax. Try:
    <?php do_action( 'the_languages', array('show_flags' => 1, 'show_names' => 0) ); ?>

    of course!
    thank you
    I must donate Your project!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Polylang] I have no widgets on my theme’ is closed to new replies.