Hi,
I’m trying to create a common block between parent and childs multisites (for example field textarea with data).
I need to recover get_field(‘textarea_presentation’) from the post object (cf post.png)
I need to access post_content->data->textarea_presentation
Can you help me please ?
Thank you so much
function acf_block_render_child_callback($block)
{
dump(get_field('text_child'));
switch_to_blog(1);
$args = [
'name' => 'hp',
'post_status' => 'publish',
'post_type' => 'page'
];
$presentation = Timber::get_post($args);
//dump(get_field('textarea_presentation'));
//dump($presentation->get_field('textarea_presentation'));
restore_current_blog();
return Timber::render(
['advanced-custom-fields-templates/home-page-child.twig'],
[
'block' => $block,
'presentation' => $presentation
]
);
}