Support

Account

Home Forums Add-ons Gallery Field WPML and Gallery addon problem Reply To: WPML and Gallery addon problem

  • This is my solution untill you solved out this:

    in your functions.php put this function:

    function custom_get_attachments($ids){
    	GLOBAL $wpdb;
    	$query = "SELECT * FROM {$wpdb->posts} WHERE post_type = 'attachment' AND ID IN ('".implode("','", $ids)."')";
    	$results = $wpdb->get_results($query);
    	return $results;
    }

    and then in gallery.php instead of

    $attachments = get_posts(array(
    			'post_type' => 'attachment',
    			'numberposts' => -1,
    			'post_status' => null,
    			'post__in' => $value,
    		));

    put this
    $attachments = custom_get_attachments($value);