7

We completed a round of testing between WordPress 4.1 and WPML. We’re very happy to report that WPML works with the new WordPress version. In our testing, we found two glitches with the new TwentyFifteen theme. This post explains these glitches and how to work around them.

First, the good news. WPML is fully compatible with WordPress 4.1. If you have existing sites, you can upgrade to WordPress 4.1 and you will not get new issues with WPML. As with any new WordPress version, you may run into issues with other plugins or the theme, so it’s a very good idea to test this upgrade on development sites first.

The issues that we’ve noticed are related to the new TwentyFifteen theme. If you are using it on new WordPress 4.1 sites or you are using a theme that’s derived from TwentyFifteen, make sure to apply the patches described in this post.

Footer Language Switcher Trimmed

The TwentyFifteen theme has a new footer and requires a tiny CSS patch to display WPML’s language switcher correctly.

Without this patch, the language footer switcher is partially hidden by the left sidebar.

Fortunately, there’s an easy fix, which you can apply directly from the WordPress admin. Go to WPML -> Languages -> Additional CSS (in Language switcher options section). The following CSS code will make the footer language switcher display correctly:

#lang_sel_footer {
    position: absolute;
    width:100%
}

This is how it will look in WPML’s admin screen:

Languages ‹ WPML — WordPress

Short Content Next to a Long Sidebar

Pages or posts that have very short content, next to very long sidebars may show another problem. When you scroll to the bottom of the page, you might be thrown back up to the top. To avoid the problem, you can disable WPML’s language switcher and add it manually using a theme-hook.

  1. Deactivate the language switcher footer from WPML -> Languages -> Footer language switcher style. Un-check the option to Show language switcher in footer.
    image02
  2. Edit your theme’s function.php and add the following code at the very end:
    add_action('twentyfifteen_credits', 'footer_language_switcher');
    function footer_language_switcher() {
    	echo do_shortcode('[wpml_language_selector_footer]');
    }

This patch will insert WPML’s footer language switcher to the credits section, where it will display nicely and correctly.

Have you tried WordPress 4.1 yet?

7 Responses to “Compatibility with WordPress 4.1”

  1. Language translation is really very important. But I want to ask that this is compatible
    with wordpress is there any PHP related issue in it ??

    • Kalpana, my apologies, but I’m not sure I understand your question.
      Our workaround has no PHP related issues, but I think you meant something different.
      Could you kindly rephrase your question please?

  2. it is not working with magzine pro child theme on genesis after upgrade to 4.1, the sit is getting totally messed up, there are dummy items added to the meu and even images are not showing.

    • Hello Saurabh,

      I think in your case it would be better if you could post a new thread in the support forum, so to get the appropriate help for the issue you are facing.

      We have a team dedicated to theme compatibility which will be able to help you on this.

    • Hello Matias,

      No, WPML 2.8.2 is not compatible with WordPress 4.1: you need to use the most recent version, or you will face several compatibility issues.