Support

Account

Home Forums General Issues Post Object, not consistent… Reply To: Post Object, not consistent…

  • Hi @brotsky_pixie

    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 🙂