{"id":529354,"date":"2014-12-16T13:49:00","date_gmt":"2014-12-16T13:49:00","guid":{"rendered":"http:\/\/wpml.org\/?p=529354"},"modified":"2015-04-22T17:13:33","modified_gmt":"2015-04-22T17:13:33","slug":"compatibility-wordpress-4-1","status":"publish","type":"post","link":"https:\/\/wpml.org\/de\/changelog\/2014\/12\/compatibility-wordpress-4-1\/","title":{"rendered":"Compatibility with WordPress 4.1"},"content":{"rendered":"<p><strong>We completed a round of testing between WordPress 4.1 and WPML. We\u2019re 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.<\/strong><\/p>\n<p>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\u2019s a very good idea to test this upgrade on development sites first.<\/p>\n<p>The issues that we\u2019ve 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\u2019s derived from TwentyFifteen, make sure to apply the patches described in this post.<\/p>\n<h2>Footer Language Switcher Trimmed<\/h2>\n<p>The TwentyFifteen theme has a new footer and requires a tiny CSS patch to display WPML\u2019s language switcher correctly.<\/p>\n<p>Without this patch, the language footer switcher is partially hidden by the left sidebar.<\/p>\n<p>Fortunately, there\u2019s an easy fix, which you can apply directly from the WordPress admin. Go to <strong>WPML -&gt; Languages -&gt; Additional CSS<\/strong>\u00a0(in\u00a0Language switcher options\u00a0section). The following CSS code will make the footer language switcher display correctly:<\/p>\n<pre>#lang_sel_footer {\r\n    position: absolute;\r\n    width:100%\r\n}<\/pre>\n<p>This is how it will look in WPML\u2019s admin screen:<\/p>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/Languages-----WPML-----WordPress.png\"><img decoding=\"async\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/Languages-----WPML-----WordPress-300x102.png\" alt=\"Languages \u2039 WPML \u2014 WordPress\" width=\"300\" height=\"102\" class=\"aligncenter size-medium wp-image-604285\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/Languages-----WPML-----WordPress-300x102.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/Languages-----WPML-----WordPress-150x51.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/Languages-----WPML-----WordPress-1024x348.png 1024w, https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/Languages-----WPML-----WordPress.png 1123w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>Short Content Next to a Long Sidebar<\/h2>\n<p>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\u2019s language switcher and add it manually using a theme-hook.<\/p>\n<ol>\n<li>Deactivate the language switcher footer from\u00a0<strong>WPML -&gt; Languages -&gt; Footer language switcher style<\/strong>. Un-check the option to <strong>Show language switcher in footer<\/strong>.<br \/>\n<a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/image02.png\"><img decoding=\"async\" class=\"aligncenter\" style=\"height: 106px;width: 300px\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2014\/12\/image02-300x106.png\" alt=\"image02\" \/><\/a><\/li>\n<li>Edit your theme\u2019s <strong>function.php<\/strong> and add the following code at the very end:\n<pre>add_action('twentyfifteen_credits', 'footer_language_switcher');\r\nfunction footer_language_switcher() {\r\n\techo do_shortcode('[wpml_language_selector_footer]');\r\n}<\/pre>\n<\/li>\n<\/ol>\n<p>This patch will insert WPML&#8217;s footer language switcher to the credits section, where it will display nicely and correctly.<\/p>\n<p><strong>Have you tried WordPress 4.1 yet?<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We completed a round of testing between WordPress 4.1 and WPML. We\u2019re 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 [&hellip;]<\/p>\n","protected":false},"author":47714,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ep_exclude_from_search":false,"footnotes":""},"categories":[48],"tags":[],"class_list":["post-529354","post","type-post","status-publish","format-standard","hentry","category-changelog"],"_links":{"self":[{"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/posts\/529354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/users\/47714"}],"replies":[{"embeddable":true,"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/comments?post=529354"}],"version-history":[{"count":11,"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/posts\/529354\/revisions"}],"predecessor-version":[{"id":604288,"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/posts\/529354\/revisions\/604288"}],"wp:attachment":[{"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/media?parent=529354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/categories?post=529354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpml.org\/de\/wp-json\/wp\/v2\/tags?post=529354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}