Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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!
    Marc

    #1413806

    Hey 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.

    // https://wpml.org/documentation/getting-started-guide/translating-post-categories-and-custom-taxonomies/

    Best regards,
    Ismael

    #1413831

    Hi 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
    Marc

    #1413921

    Hi,

    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,
    Ismael

    #1414196

    Hi Ismael,

    thanks for the code. Unfortunately it doesn’t help. Login details in the private field.

    Thanks a lot in advance for your efforts!
    Marc

    #1414298

    Hi,

    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,
    Ismael

    #1414674
    This reply has been marked as private.
    #1414733

    Hi,

    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,
    Ismael

    #1415006

    Hi 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
    Marc

    #1415656

    Hi,
    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
    Enfold_Support_2853.jpeg

    Best regards,
    Mike

    #1416460

    Hi 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!
    Marc

    #1416470

    Hi,
    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,
    Mike

    #1416742

    Hi Mike,
    thanks a lot for reply.
    I changed back tag names. Login details attached.
    Thanks in advance!

    #1416809

    Hi,
    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,
    Mike

    #1418892

    Hi Mike,
    Thank you for your effort. Are there any solutions from the team?
    Best regards
    Marc

    #1418979

    Hi,

    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,
    Ismael

    #1419450

    Hi Ismael,
    great, thanks a lot for support!!!
    Best regards
    Marc

    PS: This is a permanent solution and will not be overwritten with the next theme update on our website, right?

    #1419454

    Hi,

    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

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Masonry – tag “portrait” does not work in mulitlingual pages’ is closed to new replies.