Hello,
I have used ACF Pro fairly successfully in this website however I am now stuck.
I created a new WYSIWYG field and added it to my Custom Post Type.
I created a new Template and added the ACF PHP Code and it will not display the content and I cannot figure out why. I think this should be very straight forward. Why won’t my custom content show?
<?php
if( get_field('exphw_special_offer')) {
echo '<div>';
the_field('exphw_special_offer');
echo '</div>';
}
?>
Below is my Custom Template which includes the ACF code.
<?php
if( get_field('exphw_special_offer')) {
echo '<div>';
the_field('exphw_special_offer');
echo '</div>';
}
?>
<?php
// =======================================================================================
// /PRO-CHILD/CUSTOM_SPECIALS.PHP (No Container | Header, Footer)
// -----------------------------------------------------------------------------
// Special Offers Single Page Template for X-Theme Pro Renew
/* Template Name: Specials */
// =======================================================================================
get_header();
?>
<div class="x-container max width offset">
<div class="x-main full" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php x_get_view( 'global', '_content', 'the-content' ); ?>
</article>
<!-- START CPT SPECIALS -->
SPECIALS
<?php
if( get_field('exphw_special_offer')) {
echo '<div>';
the_field('exphw_special_offer');
echo '</div>';
}
?>
<!-- END CPT SPECIALS -->
<?php endwhile; ?>
</div>
</div>
<?php get_footer(); ?>
As you can see here, the content is not displaying in the new custom Template.
How do I get this content to show?
Micah