WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
show language in all kinds of urls update (9 posts)

  1. brbrbr
    Member
    Posted 2 years ago #

    Hi,

    thanks a lot update,

    I needed to deinstall and reinstall te plugin to get the language url's working for pages but now it works great.
    two issues

    In the previous version I could assign different page templates, so could have a different template per language. Now they seem connected.

    The home-page shows the full page-url for each language ( except the default one). We have a page as homepage and would like to have the homepages for each language short

    example.com/
    example.com/en/homepage => example.com/en/
    exampe.com/de/startseite => example.com/de/

    I tried using a rewriterule, but that didn't work.

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

  2. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    1. Having the same page template for translations is a desired feature. However, it should be possible to deactivate it.

    Look here and replace '_thumbnail_id' by '_wp_page_template'. However, there is a bug in 0.7 and older which will be corrected in 0.7.1. Quick fix is described here. I did not test, so please tell me if it's ok.

    2. This is a current limitation of Polylang. As the language is a custom taxonomy, the url example.com/en/ corresponds to the posts archive in English. So it is currently not possible to use the url for a page.

  3. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    I added the possibility to use the language page as home page in 0.8. You can try the development version if you want.

  4. spiler
    Member
    Posted 2 years ago #

    So how can I deactivate the same page templates for translations in version 0.7.2 ?

  5. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    Create a new file in your favorite text editor and paste this:

    <?php
    /*
    Plugin Name: MyPlugin
    */
    
    add_filter('pll_copy_post_metas', 'unsync_template');
    function unsync_template($metas) {
    	return array_diff($metas, array('_wp_page_template'));
    } ?>

    save it as whateveryouwant.php
    Upload the file in wp-content/plugins/
    Activate the plugin 'MyPlugin'

  6. spiler
    Member
    Posted 2 years ago #

    It worked! Thanks for fast support :)

  7. AntonVershinin
    Member
    Posted 1 year ago #

    I'm sorry, I probably a stupid question. I need to transition to different languages ​​changed the picture header. How can this be done?

  8. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Is your theme using featured image for picture header (as Twenty eleven)? If this the case, just go in settings->languages->settings and uncheck "Allow to synchronize categories, tags, featured image and other metas between translations of a post or page"

  9. AntonVershinin
    Member
    Posted 1 year ago #

    Good night! Thankful that responded quickly. No, this topic generated in Artisteer and dedicated conference. So make footer in the form of images in various languages.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags