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


Getting a custom field from a 'linked' post type

    • codynew

    • December 31, 2014 at 3:23 am


    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.

    • ractoon

    • January 18, 2015 at 7:06 am

    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)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.