Home › Forums › Bug Reports › Relationship field – Wpml › Reply To: Relationship field – Wpml
Hello Elliot,
Here http://pastebin.com/3FxrprJr ,
you can see the output of “var_dump(get_field(‘relation_sejour_chambre’) );”.
I got all the data’s in French (Primary language) but none in the secondary languages (Nl and En)
As you said, currently both French and En Url’s produce an empty array for both but only since yesterday when Andreas from WPML plugin has asked me to add :
1. this function in my functions file : http://pastebin.com/V3v1UBvP
2. Replace $posts = get_field(‘relation_sejour_chambre’);
with $posts = lang_object_ids( get_field(‘relation_sejour_chambre’), ‘post’ );
Since I did action number 2, I got this error :
Catchable fatal error: Object of class WP_Post could not be converted to string in /homez.533/reloukin/vm/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 179
And the result of this error is an empty echo array on the page in the main language french.
If I let action number 2 as it was before, I got a nice arrow in french (main language) and “array(0) { } ” in the secondary languages…
What do you think ?
Thank you for your help !
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.