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:
    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 🙂