Home › Forums › Front-end Issues › ACF works perfect locally, completely fails live. › Reply To: ACF works perfect locally, completely fails live.
Below is the code for posts page. The ‘Hello World’ post has dummy content in each field and has been posted and updated multiple times.
I know it looks like I left out the content and what’s weirder is, while video and poetry content do exist, their tabs are non existent unlike the state and gallery tabs. But while those tabs exist, they’re empty even though there is post data submitted for each content type.
I don’t have any caching plugins installed, could there be a caching setting set by my hosting service by default? I host with ipage.com if that helps.
<?php
get_header();
$idObj = get_category_by_slug('category-name');
$id = $idObj->slug;
$ftimg = wp_get_attachment_url( get_post_thumbnail_id($post->ID));
$statementTrue = get_field( "statement" );
$galleryTrue = get_field("image_gallery");
$videoTrue = get_field("video_embed");
$poetryTrue = get_field("poem_1");
?>
<div id="single">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div id="tabs">
<section class="post-title" style="background-image: url(<?php echo $ftimg; ?>); background-size: cover; background-position-y: 50%;">
<div id="titleoverlay">
<h1 class="titles title"><?php the_title(); ?></h1>
</div>
<?php include("includes/tabnav.php"); ?>
</section>
<?php if ( $statementTrue == true ) : ?>
<div id="statement-tab">
<?php get_template_part('content', 'statement'); ?>
<div id="social-footer">
<?php include('includes/social-footer.php'); ?>
</div>
</div><!--end statement-tab-->
<?php endif; ?>
<?php if ( $galleryTrue == true ) : ?>
<div id="gallery-tab">
<?php get_template_part('content', 'gallery'); ?>
<div id="social-footer">
<?php include('includes/social-footer.php'); ?>
</div>
</div><!--end gallery-tab-->
<?php endif; ?>
<?php if ( $videoTrue == true ) : ?>
<div id="video-tab">
<?php get_template_part('content', 'video'); ?>
<div id="social-footer">
<?php include('includes/social-footer.php'); ?>
</div>
</div><!--end video-tab-->
<?php endif; ?>
<?php if ( $poetryTrue == true ) : ?>
<div id="poetry-tab">
<?php get_template_part('content', 'poetry'); ?>
</div><!--end-poetry tab-->
<?php endif; ?>
</div>
<?php endwhile; else: ?>
<p class="noposts">Nope. No posts. single.</p>
<?php endif; ?>
<?php get_footer(); ?>
</div>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.