WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] I have no widgets on my theme (14 posts)

  1. saule
    Member
    Posted 2 years ago #

    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/

  2. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. kn00tcn
    Member
    Posted 2 years ago #

    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

  4. kn00tcn
    Member
    Posted 2 years ago #

    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

  5. kn00tcn
    Member
    Posted 2 years ago #

    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

  6. Damian B.
    Member
    Posted 2 years ago #

    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!

  7. Damian B.
    Member
    Posted 2 years ago #

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

  8. Damian B.
    Member
    Posted 2 years ago #

    but ... does not work
    ;(

  9. Damian B.
    Member
    Posted 2 years ago #

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

  10. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  11. Damian B.
    Member
    Posted 2 years ago #

    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?

  12. Damian B.
    Member
    Posted 2 years ago #

    but in header i only have text names ...

  13. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

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

  14. Damian B.
    Member
    Posted 2 years ago #

    of course!
    thank you
    I must donate Your project!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags