Open razaanstha opened 1 year ago
It would be great if there was an option to trigger a block reload if you change the title or change the featured image.
@arjendejong12 exactly, I found out that this is possible to synchronize the post fields if you are using it as a template in <InnerBlocks />
like core/post-title
, core/featured-image
and other blocks connecting to posts fields but I found out that its not possible to sync when using the raw php functions directly in the render template.
I know this is a bit late, but could you instead insert a core/pattern block for the render template, and use the core/post-title
and core/featured-image
inside the pattern? I don't know if that would get around the issue you're experiencing.
I have used the ACF function acf_register_block_type to register a new block. In the render template, I have included the post title and post thumbnail as the block title and background image, respectively. However, when the post title
get_the_title()
or thumbnailget_the_post_thumbnail()
is updated dynamically, the block does not show the fresh data unless the post is reloaded.