Home › Forums › General Issues › WPML get fields from another page › Reply To: WPML get fields from another page
Hey!
I just did the same for an website I am made.
There are two solutions:
1/ Option
Instead of placing your fileds in the HP, you should creat an option page:
https://www.advancedcustomfields.com/resources/options-page/
That works just fine 🙂
2/ Dynamic #ID based on your language
Place this up the page in your php code :
<?php $pageID = icl_object_id(329, 'page', false); ?>
Change 329 by tyour HP’s ID.
Then, to call the field use this:
<?php the_field('MY_FIELD_NAME_HERE', $pageID); ?>
Even if the second solution works fine, the 1st one is more convenient for the BackEnd user 🙂
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.