Solved. I had a typo – line 10:
$post_object = get_field('post_object');
should have had the name of my post object field ie:
$post_object = get_field('myfieldname');
Solved. I had a typo – line 10:
$post_object = get_field('post_object');
should have had the name of my post object field ie:
$post_object = get_field('myfieldname');