Home › Forums › General Issues › Post Object, not consistent… › Reply To: Post Object, not consistent…
I’m sorry I thought you’re using the PRO version, which uses JSON as the export file.
Regarding your issue, I’m afraid I don’t quite understand your setup, so please forgive me if I’m wrong.
Looking at your code and the export file, I believe you should do it like this:
<?php
$post_quote = get_field('associated_quote');
if( $post_quote ): ?>
<blockquote class="testimonial">
<?php
$post = $post_quote;
setup_postdata( $post );
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post_quote->ID), 'thumbnail' );
$url = $thumb['0'];
the_content();
the_title(); ?>
<img src="<? echo $url; ?>" title="<?php the_title(); ?>" style="height: auto; width: auto;" class="testimonial-image">
</blockquote>
<?php endif;
wp_reset_query(); ?>
If that doesn’t work, I think you can do it like this:
<?php
$post_quote = get_field('associated_quote');
if( $post_quote ): ?>
<blockquote class="testimonial">
<?php
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post_quote->ID), 'thumbnail' );
$url = $thumb['0'];
echo $post_quote->post_content;
echo $post_quote->post_title;
?>
<img src="<? echo $url; ?>" title="<?php echo $post_quote->post_title; ?>" style="height: auto; width: auto;" class="testimonial-image">
</blockquote>
<?php endif; ?>
If still no joy, could you please open a new ticket and provide temporary admin credentials to your site? You can open a new ticket here: https://support.advancedcustomfields.com/new-ticket. Also, please don’t forget to explain the issue again and provide the link to this thread.
Thanks 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.