Just to add that even though my ACF block was registered with underscores in the name, these had to be replaced with hyphens in the allowed_block_types() function for it to work!
add_filter( 'allowed_block_types', 'custom_allowed_block_types' );
function custom_allowed_block_types( $allowed_blocks ) {
return array(
'acf/single-text-column',
'acf/text-image-block'
);
}
Hope this helps someone 🙂
I was having this issue too using the Basic loop (without setup_postdata) on my blog/news page. I was using a relationship field to select some featured posts for the top of the page but get_the_content() always returned the content of my latest published post.
I over came this using the below code:
<?php $content = get_post_field('post_content', $p->ID); ?>
<p><?php echo $content; ?></p>