8000 Image in Flexible Content .. can't get ID · Issue #86 · corcel/acf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Image in Flexible Content .. can't get ID #86
Open
@codemonkeynorth

Description

@codemonkeynorth

Hi,

I've got an image within a flexible content block and I'm trying to get its ID so I can pass it to a WP function

$blocks  = $post->acf->flexibleContent('flexible_content_blocks');
foreach($blocks as $block) {
  $image = $block->fields->image;
  $ID = $image->ID; // fails
  wp_get_attachment_image($ID,  'fullsize', '', ['class' => 'foo']);
}

currently using

"jgrossi/corcel": "2.8",
"corcel/acf": "^1.1.1"

(I can't update due to other dependencies currently)

thanks for any advice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0