Home Forums General Issues Using ACF to fill a custom archive loop? Reply To: Using ACF to fill a custom archive loop?

  • Thanks for the clarification, @elliot It turns out what I was doing works on my local computer running MAMP, but it fails when I try to transfer it to a live site. In fact, I can’t call any ACF fields on my pages at all.

    I have WP multisite running on both configurations, with the same plugins running on both as well, and the same functions.php file, obviously. I have Hostgator as a hosting server, and I don’t know if there’s something on their end which is interfering with ACF.

    Here is a piece of code that results in the correct ACFs being called while on MAMP, but calls nothing while on the live site:

    add_action( 'genesis_post_content', 'caremaestro_post_content', 14 );
    function caremaestro_post_content() { 
    if ( is_post_type ('programs'|| 'services' ) && !is_archive() &&!is_page (array(47,104,77,92,118)) &&! is_post_type ('press') )  { ?>
    <img class="infoicon" src="<?php the_field('informative_icon', 'programs'); ?>" width="100%" />
    <div class="descriptive-headline"><p><?php the_field('short_descriptive_headline','programs'); ?></p></div>
    <div class="description-full"><p><?php the_field('description','programs'); ?></p></div>
    <img class="diagram" src="<?php the_field('diagram'); ?>" width="100%" />
    <div class="features"><h4>Features</h4><?php the_field('features','programs'); ?></div>
    <div class="benefits"><h4>Benefts</h4><?php the_field('benefits','programs'); ?></div>

    Actually, on MAMP I didn’t even have to use the $post_ID parameter, and it still worked. But on the live site, with the $post_ID parameter, nothing is populated. I still get the h4 headlines though, so I know the PHP is working. There’s just nothing between the <p> tags. I’m just befuddled over what could be interfering.