-
AuthorPosts
-
March 14, 2016 at 12:19 pm #597674
Hi,
I’m using WPML for multiple languages on my site. The default language (dutch) works fine with the masonry portrait and landscape tags but english doesnt work at all.
This is because the tags get translated. Is there a way to disable that or a workaround?Thanks in advance
March 17, 2016 at 4:45 am #599411Hi Rhodo!
Thank you for using Enfold.
Please add this in the functions.php file:
add_filter('avf_ratio_check_by_tag_values', 'avf_ratio_check_by_tag_values_mod', 10, 1); function avf_ratio_check_by_tag_values_mod($tags) { $lang = ICL_LANGUAGE_CODE; if($lang == 'de') $tags = array('portrait' => 'tagslughere', 'landscape' => 'tagslughere'); return $tags; }
Set the slug of the german tag as portrait and landscape value.
Regards,
IsmaelMarch 17, 2016 at 1:54 pm #599584Hi Ismael,
Thanks! Now the tags for the english part of the website are working but they stopped working on the dutch part.
Should i add this code for each language?March 18, 2016 at 10:43 am #600188Hi!
My bad. I thought that the dutch part is not working. Please post the login details here. We would like to check the settings.
Best regards,
IsmaelMarch 23, 2016 at 3:36 pm #602564Hi,
Here’s an admin login.
Thx in advance!
March 25, 2016 at 4:13 am #603535Hi!
Thank you for the info. The site requires a htaccess authentication. Please post it as well.
Regards,
IsmaelMarch 29, 2016 at 10:01 am #604325Hi Ismael,
The htaccess authentication login is provided by the hosting company as an extra security. It says in the description in the popup. I don’t know what it is.
March 30, 2016 at 3:11 am #604884Hey!
The authentication details are not included in the popup. Please ask your hosting provider or post the .htpasswd code on pastebin.com.
Cheers!
IsmaelApril 1, 2016 at 3:21 pm #606713Hi Ismael,
The hosting company says the details DO appear in the popup.
But i will provide them aswell just in case ;-)April 2, 2016 at 11:28 am #606937Hi!
I’m sorry but it doesn’t show in the popup. You can check it yourself. We modified the code in the functions.php file:
add_filter('avf_ratio_check_by_tag_values', 'avf_ratio_check_by_tag_values_mod', 10, 1); function avf_ratio_check_by_tag_values_mod($tags) { $lang = ICL_LANGUAGE_CODE; if($lang == 'en') $tags = array('portrait' => 'portrait-en', 'landscape' => 'landscape-en'); return $tags; }
Regards,
IsmaelApril 30, 2016 at 6:36 pm #625097Hi Ismael,
Thanks for the reply.
The landscape and portrait tags still dont work for both languages. The code you added just works for either dutch or english and automatically disables it for the other. So should i conclude that it’s not possible to have the masonry working with the tags and multilanguage?
Hope there is still a solution somehow…
May 8, 2016 at 3:28 am #628746Hi,
Did you see the value in the part of the suggested code?
if($lang == 'en') $tags = array('portrait' => 'portrait-en', 'landscape' => 'landscape-en');
Did you you use ‘portrait-en’ and ‘landscape-en’ for the english language?
Best regards,
IsmaelMay 8, 2016 at 1:08 pm #628856Hi Ismael,
Thanks but the problem is as soon as i add that code the masonry portfolio and landscape tags for dutch stop working.
I tried to add this:
if($lang = 'nl') $tags = array('portrait' => 'portrait', 'landscape' => 'landscape');
so the complete code is:
add_filter('avf_ratio_check_by_tag_values', 'avf_ratio_check_by_tag_values_mod', 10, 1); function avf_ratio_check_by_tag_values_mod($tags) { $lang = ICL_LANGUAGE_CODE; if($lang = 'en') $tags = array('portrait' => 'portrait-en', 'landscape' => 'landscape-en'); if($lang = 'nl') $tags = array('portrait' => 'portrait', 'landscape' => 'landscape'); return $tags; }
But then still only dutch works and english doesn’t!
Is there no way this can be fixed? It’s been a couple of weeks now and it still does not work. Would be nice if there is some sort of fix.
May 10, 2016 at 8:50 am #629739Hi!
The equal operator is incorrect. My bad. It’s working now:
Best regards,
IsmaelMarch 6, 2017 at 8:58 pm #756588Hi Ismael,
Masonry landscape and portrait not working in Multilanguage site.
The embedded code you place here: https://kriesi.at/support/topic/masonry-landscape-and-portrait-not-working-in-multilanguage-site/ is disappeared, I also heave a problem with my English en German version that the landscape and portrait tags are not working in the masonry?Could you give me the code to fix this?
Thanks Sabrina.
March 8, 2017 at 5:52 am #757478Hi Sabrina,
You posted that you got the problem solved in this thread: https://kriesi.at/support/topic/masonry-landscape-and-portrait-not-working-in-multilanguage-site-2/#post-756589, is that correct?
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.