Support

Account

Forum Replies Created

  • Oh wow, that was a really stupid mistake on my part. It was late at night and I was just trying whatever I could and forgot what version I was copy-pasting over.

    Basically, my live site wasn’t calling the custom fields while my local install was.

    I did manage to fix it. Something in my live install was interfering, it looks like. I deleted the WordPress install on my live server and reinstalled it manually (instead of using the Fantastico script provided by Hostgator), then used a Migrating DB plugin to push the local database exactly the way it is to the live server, and all my custom field calls work now. Something just got a little messed up along the way the first time, me thinks…

    Thanks for your patience and your quick response!

  • 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.

    Thanks!

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