Tagged: enfold, masonry grid, multilingual
-
AuthorPosts
-
August 18, 2017 at 3:03 pm #840893
Hello, I have a a masonry grid that should be managed with the portrait/landscape tags. It works in the primary language, but in the secondary language the tags become portrait-en and landscape-en
I tried to modifiy the function found in av-helper-masonry.php file adding the code in my child thene functions.php but it doesn’t work. Could you please suggest me the proper way to solve the problem? Thank you very much
August 19, 2017 at 9:30 pm #841428Hey Elena,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Here is a thread for you to consider
https://wpml.org/forums/topic/how-to-disable-en-suffix-in-tag-names/Best regards,
VictoriaAugust 21, 2017 at 10:07 am #841927Thanks very much here below the account
August 23, 2017 at 6:56 pm #843222Hi,
Can you please add the following code and let us know if it works please
add_filter('single_term_title','filter_single_term_title'); function filter_single_term_title($category_title) { return str_replace('@'.ICL_LANGUAGE_CODE, '', $category_title); }
Thank you
Best regards,
BasilisAugust 24, 2017 at 8:22 am #843369Hi Basilis, unfortunately your solution doesn’t change the situation, Actually I see that the masonry thumbnail has the following code on the link
<a id="av-masonry-1-item-1970" class="av-masonry-entry isotope-item post-1970 post type-post status-publish format-standard has-post-thumbnail hentry category-marble tag-landscape-en tag-portait-en all_sort marble_sort av-masonry-item-with-image av-grid-img av-masonry-item-loaded" href="http://www.alessandrapoliti.com/en/rinoceronte/" data-av-masonry-item="1970" title="Rinoceronte" itemscope="itemscope" itemtype="https://schema.org/CreativeWork" style="position: absolute; left: 49.7601%; top: 0px;">
The problem is that it gets the class “tag-landscape-en” and “tag-portait-en” while the masonry appearence works with classes such as “tag-landscape” and “tag-portrait”
Elena
August 29, 2017 at 4:18 am #845149Hi,
Please add the following filter in the functions.php then specify your own tag slug for each language.
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' => 'tagslughere', 'landscape' => 'tagslughere'); return $tags; }
Best regards,
IsmaelAugust 29, 2017 at 7:53 pm #845436Great! Now it works! Thank you very much: always a great job!
August 30, 2017 at 8:37 am #845682 -
AuthorPosts
- You must be logged in to reply to this topic.