Hello,
My website has MetaBox and WPML installed, with English as the primary language and German as the secondary language.
I have the ID of the German version of the post type "merchant". I thought I would be able to get a field value of that post with the below code. Both the post type and field are translatable in WPML, and have been translated.
$merchant_name = rwmb_get_value( 'content_long_title', '', $postID );
But that returns nothing.
This returns the expected German value:
$postIDde = apply_filters( 'wpml_object_id', $postID, 'merchant', false, 'de');
$merchant_name = get_post_meta( $postIDde, 'content_long_title', true);
This returns nothing either:
$postIDde = apply_filters( 'wpml_object_id', $postID, 'merchant', false, 'de');
$merchant_name = rwmb_get_value( 'content_long_title', '', $postIDde );
Can rwmb_get_value not deal with fields that have been made translatable with WPML? If there is a way to make it work, please let me know.