Hey Elliot, when I use that code in my backend, my site shuts down with an error.
Just text markup… Would you mind repeating the instructions step by step because I kind of get confused when “debug” is thrown out there.
Thanks.
Hello, I tried my best to follow your instructions, but I still could not get the custom field values to appear in the front end.
I have a separate custom field: ‘Text area’ that is working fine on the site.
adlinks is the field label.
<?php
$post_object = get_field(‘post_object’);
if( $post_object ):
// override $post
$post = $post_object;
setup_postdata( $post );
?>
<div>
<h3>“><?php the_title(); ?></h3>
<span>Post Object Custom Field: <?php the_field(‘adlinks’); ?></span>
</div>
<?php wp_reset_postdata(); // IMPORTANT – reset the $post object so the rest of the page works correctly ?>
<?php endif; ?>