This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
| Status | 
					Topic
					 | 
				Supporter | Voices | Posts | Freshness | 
|---|---|---|---|---|---|
| 
		
        Listings translations
		
		1
2
		
         
			
            Started by: amiro-4
			
			
				
                in: English Support
				
						 Problem: Classified Listing Pro, Listing translation of the custom field not working when using the duplicate feature of WPML Solution: Please add the code below to the functions.php file of your theme: 
/**
 * Translate ID of in meta key for Classified Listing Pro custom field when duplicating.
 * 
 * @link wpmlsupp-11480
 */
add_action('icl_make_duplicate', function ($master_post_id, $lang, $post_array, $id) {
    global $wpdb;
 
    $all_rtcl_cf = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta where post_id = $master_post_id AND meta_key LIKE '\_field\_%'");
 
    if (!empty($all_rtcl_cf)) {
        foreach ($all_rtcl_cf as $meta_obj) {
            $meta_key_arr = explode('_', $meta_obj->meta_key);
            $rtcl_cf_id = apply_filters('wpml_object_id', $meta_key_arr[2], 'rtcl_cf', true, $lang);
 
            if (is_int($rtcl_cf_id) && $rtcl_cf_id !== $meta_key_arr[2]) {
                delete_post_meta($id, $meta_obj->meta_key);
                update_post_meta($id, '_field_' . $rtcl_cf_id, maybe_unserialize($meta_obj->meta_value));
            }
        }
    }
}, 10, 4);
We also are going to communicate with the plugin developer to add the code above or an implementation of it to their multilingual plugin.  | 
    
		                 | 
    3 | 24 | 1 year, 7 months ago | |
| 
		
        media translation
		
		
		
         Started by: amiro-4 in: English Support  | 
    2 | 2 | 1 year, 8 months ago | 
All articles written by amiro-4:
	
	
		No items found