Home Forums General Issues Getting a custom field from a 'linked' post type


Getting a custom field from a 'linked' post type

  • Hi

    The more I learn to use this plugin, the more I fall in love with it!

    I have a repeater custom field called references which then has two repeater fields. Once called ‘text’ which is just a plain text, and the other is called reference which is currently a page_link.

    The aim of what I am trying to achieve is, that the user would select a page_link for a custom post type, and for me to then display a custom field from that particular selected post.

    Really appreciate any help. I tried looking at documentation but couldn’t find anything.

  • You can display custom fields from a particular post by passing the post/page ID as the second parameter. For example:

    get_field( 'some_other_field', $post_id );

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Getting a custom field from a 'linked' post type’ is closed to new replies.