Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #268169

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

    #268445

    Hi tidusuper91!

    Please create us an admin account and post the login credentials as private reply – we’ll check the configuration.

    Best regards,
    Peter

    #268548
    This reply has been marked as private.
    #268997

    Hey!

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

    #269482
    This reply has been marked as private.
    #269644

    Hi!

    Yes, it works now. I re-saved the the gallery and php file to make sure it’s no cache issue.

    Best regards,
    Peter

    #269667

    Amazing! It works.

    Thanks for your amazing support! Have a nice Sunday!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Masonry Gallery not loading more images on translated pages (WPML)’ is closed to new replies.