 
	
		Tagged: enfold, masonry, translation, wpml
- 
		AuthorPosts
- 
		
			
				
May 21, 2014 at 8:07 pm #268169Hello everyone, 
 I have a very annoying issue:
 I create a page with a Masonry Gallery on it and I select all the images in the gallery. Perfect. When I create the translated version of this page (clicking on +) and I make the same actions the gallery is shown on the page but if I click on “Load More” the other pictures are not loaded.Moreover if I select the other method for showing the other images (Impagination) I get in the masonry all the images loaded in the media library, not just the ones selected for the gallery. Thanks in advance for your help, May 22, 2014 at 7:05 am #268445Hi tidusuper91! Please create us an admin account and post the login credentials as private reply – we’ll check the configuration. Best regards, 
 PeterMay 22, 2014 at 12:02 pm #268548This reply has been marked as private.May 23, 2014 at 7:19 am #268997Hey! I fixed it with some code in enfold/functions.php: if(!function_exists('avia_translate_ids_from_query')) { function avia_translate_ids_from_query($query, $params) { $res = array(); if(!empty($query['tax_query'][0]['terms']) && !empty($query['tax_query'][0]['taxonomy'])) { foreach ($query['tax_query'][0]['terms'] as $id) { $xlat = icl_object_id($id, $query['tax_query'][0]['taxonomy'], true); if(!is_null($xlat)) $res[] = $xlat; } if(!empty($res)) $query['tax_query'][0]['terms'] = $res; } else if(!empty($query['post__in']) && !empty($query['post_type'])) { foreach($query['post__in'] as $id) { $xlat = icl_object_id($id, $query['post_type'], true); if(!is_null($xlat)) $res[] = $xlat; } if(!empty($res)) $query['post__in'] = $res; } return $query; } add_filter('avia_masonry_entries_query', 'avia_translate_ids_from_query', 10, 2); add_filter('avia_post_grid_query', 'avia_translate_ids_from_query', 10, 2); add_filter('avia_post_slide_query', 'avia_translate_ids_from_query', 10, 2); add_filter('avia_blog_post_query', 'avia_translate_ids_from_query', 10, 2); }I’ll ask Kriesi to include it in the next update. Best regards, 
 PeterMay 24, 2014 at 1:01 pm #269482This reply has been marked as private.May 25, 2014 at 9:51 am #269644Hi! Yes, it works now. I re-saved the the gallery and php file to make sure it’s no cache issue. Best regards, 
 PeterMay 25, 2014 at 12:57 pm #269667Amazing! It works. Thanks for your amazing support! Have a nice Sunday! 
- 
		AuthorPosts
- The topic ‘Masonry Gallery not loading more images on translated pages (WPML)’ is closed to new replies.
