-
AuthorPosts
-
July 18, 2023 at 5:01 pm #1413620
Hi there ,
I am using the “Masonry” element on my website with the “Perfect Manual Masonry” setting.
Alos I use the tag “portrait” to display thumbnails of individual posts in Masonry in high format.
My site is multilingual (German-English). The tag “portrait” works for the German version of the corresponding page, but unfortunately NOT for the English version.Thanks a lot for your efforts in advance!
MarcJuly 20, 2023 at 9:25 am #1413806Hey Marc,
Thank you for the inquiry.
Which multilingual plugin are you using? If you are using WPML, you may also need to translate the post categories and custom taxonomies to ensure that the “manual masonry” option works correctly for the translated pages. Please check the documentation below for more info.
Best regards,
IsmaelJuly 20, 2023 at 1:31 pm #1413831Hi Ismael,
thanks for your reply!
The Website uses Polylang. Also there are translations for each post category.
Do you know what it could be in this case?Best regards
MarcJuly 21, 2023 at 9:41 am #1413921Hi,
Thank you for the info.
Where can we check the issue? Please provide the site URL and the login details in the private field. In the meantime, please try to add this code in the functions.php file and see if it helps.
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 = pll_current_language(); if($lang == 'hu') $tags = array('portrait' => 'portrait', 'landscape' => 'landscape'); if($lang == 'en') $tags = array('portrait' => 'portrait', 'landscape' => 'landscape'); if($lang == 'de') $tags = array('portrait' => 'portrait', 'landscape' => 'landscape'); return $tags; }
Best regards,
IsmaelJuly 24, 2023 at 9:52 am #1414196Hi Ismael,
thanks for the code. Unfortunately it doesn’t help. Login details in the private field.
Thanks a lot in advance for your efforts!
MarcJuly 25, 2023 at 3:55 am #1414298Hi,
For some reason, the temp password is not working on my end. Would you mind creating another login account instead of using a temp password?
Thank you for your patience.
Best regards,
IsmaelJuly 27, 2023 at 1:51 pm #1414674This reply has been marked as private.July 28, 2023 at 9:43 am #1414733Hi,
Thank you for the info.
We have noticed that the site contains a very old version of the theme, which is likely the reason why the masonry styling is not being applied properly. To resolve this issue, please upgrade the theme from version 4.8.8.1 to the latest version, which is 5.6.5. This update might need to be performed manually via FTP.
// https://kriesi.at/documentation/enfold/theme-update/#update-via-ftp
After the update, please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings and purge the cache in order to ensure that the upgrade goes through completely.
Best regards,
IsmaelJuly 31, 2023 at 10:19 am #1415006Hi Ismael,
I have updated Enfold (update via dashboard did not work, had to update via FTP). Unfortunately the problem still exists.
You can see this on the “Archive”-Page for instance.Best
MarcAugust 6, 2023 at 6:46 pm #1415656Hi,
Thanks for your patience and the link to your site, I see that the tag portrait is correct on the German translation: tag-portrait
But in the English translation it has been changed to tag-portrait-en
Perhaps in your plugin there is a way to remove the added -en but I don’t have experience with it.
I looked at your tags and tried to remove it, but couldn’t because your German language is already using portrait and two tags can’t be the same
Best regards,
MikeAugust 17, 2023 at 10:35 am #1416460Hi Mike,
thanks for reply. unfortunately it’s not possible to remove the “-en”. As you said, it’s not possible that two tags are the same.
Is there any fix for this problem?
Thanks in advance!
MarcAugust 17, 2023 at 12:12 pm #1416470Hi,
I’m thinking that perhaps Ismael solution could be applied like this: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 = pll_current_language(); if($lang == 'en-GB') $tags = array('portrait-en' => 'portrait', 'landscape-en' => 'landscape'); return $tags; }
but I’m not able to login to your site to test, I also notice that your German version is now not working so your tags were probably changed, try changing them back.
Best regards,
MikeAugust 21, 2023 at 8:47 am #1416742Hi Mike,
thanks a lot for reply.
I changed back tag names. Login details attached.
Thanks in advance!August 22, 2023 at 12:59 am #1416809Hi,
Thanks for the login I tried the snippet above but it doesn’t seem to work, so I asked the rest of the team for advice. Thank you for your patience.Best regards,
MikeSeptember 12, 2023 at 2:36 pm #1418892Hi Mike,
Thank you for your effort. Are there any solutions from the team?
Best regards
MarcSeptember 13, 2023 at 4:10 am #1418979Hi,
We’ve made some adjustments to the filter in the functions.php file, and now the tags are working correctly for both languages.
Thank you for your patience.
Best regards,
IsmaelSeptember 18, 2023 at 9:35 am #1419450Hi Ismael,
great, thanks a lot for support!!!
Best regards
MarcPS: This is a permanent solution and will not be overwritten with the next theme update on our website, right?
September 18, 2023 at 9:40 am #1419454Hi,
No problem! Glad we could be of help.The changes have been made in the child theme’s functions.php file, so they should not be overwritten with the next update. Please feel free to open another thread if the issue reoccurs after updating the theme.
Have a nice day.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Masonry – tag “portrait” does not work in mulitlingual pages’ is closed to new replies.