Support

Account

Home Forums Front-end Issues Suddenly none of my fields are showing in frontend

Helping

Suddenly none of my fields are showing in frontend

  • Hi All,

    I’m having a sudden problem where none of my image fields are showing anymore.

    They were showing with this setup for years, but now are coming up blank. I’m on WordPress 4.9.8 at this time.

    Anyway, please see my screenshot for how my image field is set up. I’m using an array.

    The code in my content-single.php file is:

    <?php if(get_field('_abk_photo')): ?>
    	<a class="acf_main_image" href="<?php $image = get_field('_abk_photo', $post_id ); echo($image['sizes']['large']); ?>" rel="lightbox" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'rt_myriad_wp' ), the_title_attribute( 'echo=0' ) ) ); ?>"><img class="product_imgabk" src="<?php $image = get_field('_abk_photo', $post_id ); echo($image['sizes']['medium']); ?>" alt="" /></a>
    	<?php else : ?>
    		<img src="../../../../uploads/2012/11/Product-Page-btn-spacer.png" alt="" />
    	<?php endif; ?>

    The code that is now output instead of the image is:

    <a class="acf_main_image" href="7" rel="lightbox" title="Permalink to Post Title"><img class="product_imgabk" src="7" alt=""></a>
    	<img class="product_imgabk" src="7" alt="">
    </a>

    Can anyone tell what the heck is going on here?

  • Alright well I’ve tracked it to some sort of incompatibility with the Gantry4 framework. Which itself is odd because it’s been running on this same thing for a year.

    However when I switched to the previous theme then images all showed. I also switched to a brand new Twenty Seventeen install and added my theme code and they showed up there as well.

    So I’m going to focus there and see if there’s anything I can do to fix this issue or move to a different theme.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Suddenly none of my fields are showing in frontend’ is closed to new replies.