Support

Account

Home Forums ACF PRO Getting custom flexible content field from post object

Unread

Getting custom flexible content field from post object

  • Hello all,
    I am using the Post Object field to choose a post which is displayed on another page.

    The documentation explains how to get value from a custom field like so:

    
    $featured_posts = get_field('featured_posts');
    $custom_field = get_field( 'field_name', $featured_post->ID );

    But, the post uses flexible content fields, so this doesn’t work since the fields are sub_fields of the flexible content fields.

    Question: how to get the value from my custom field?
    Thanks!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.