Support

Account

Home Forums Add-ons Repeater Field get_field occassionally returning string with repeater field Reply To: get_field occassionally returning string with repeater field

  • Update II: In response to the issue of my thumbnails not displaying; I have figured this out if anyone else with similar issues stumbles into this…

    Basically, for me, I eliminated the then unnecessary pre_get_posts filter and then replaced;

    <?php $image = wp_get_attachment_image_src(get_field('event_thumbnail'), 'full'); ?>
    <img src="<?php echo get_field('event_thumbnail'); ?>" alt="<?php echo get_the_title(get_field('event_thumbnail')) ?>" />

    with:

    <?php $image = get_field('event_thumbnail'); ?>
    <img src="<?php echo $image; ?>" alt="<?php echo get_the_title(get_field('event_thumbnail')) ?>" />

    For some reason (probably some conflict again), wp_get_attachment_image_src returns as false. But get_field('event_thumbnail') returns the image anyway, so all that was needed was to remove this wp_get_attachment_image_src function!

    Hope this helps someone!