ACF Fields not showing up
-
I’ve been trying to get a CPT archive page to convert to PDF. Basically, i have a CPT acting as a directory with addresses using Advanced Custom Fields, and want to print off a PDF of the archive page that is set up as address labels.
I’ve got it working to the point of showing the post titles in the pdf, but I also need to get the ACF fields showing.
Here’s what’s in my template that needs to print (along with the suggested php codes:
<?php pdf24Plugin_begin(); ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <article class="listing"> <a href="<?php the_permalink(); ?>" class="listing-link"> <div class="row"> <div class="col-sm-8 col-xs-12 listing-archive-description"> <div class="listing-title-desc"> <?php the_content(); ?> <h4><?php the_field('SALUTATION');?> <?php the_field('FIRSTNAME');?> <?php the_title(); ?>...</h4> <p><?php the_field('C_STREET');?></p><p> <?php the_field('C_ADDITIONAL');?></p><p> <?php the_field('C_CITY');?>, <?php the_field('C_PROVINCE');?> </p><p> <?php the_field('C_COUNTRY');?> </p><p><?php the_field('C_POSTALCODE');?></p> </div> </div> </div> </a> </article> <?php endwhile; ?> <?php pdf24Plugin_end(); ?>
But all i still see is the title. I know in the options i can change the pdf layout, but when i add the required Custom Field elements above, it doesn’t show up.
Any ideas? Am i doing something wrong?
- The topic ‘ACF Fields not showing up’ is closed to new replies.