Not working with Advanced Custom Fields Repeater Fields
-
How would you recommend outputting the PDF thumbnail in this situation? I’ve tried your code example but they haven’t worked for me.
<?php // check if the repeater field has rows of data if( have_rows('resource_upload') ): ?> <ul class="resource-feed"> <?php // loop through the rows of data while ( have_rows('resource_upload') ) : the_row(); // display a sub field value $docTitle = get_sub_field('document_title'); $docLink = get_sub_field('document_upload'); ?><li> <a href="<?php echo $docLink; ?>" target="_blank"><div class="thumbnail"></div></a> <div class="doc-content"> <h2><?php echo $docTitle; ?></h2> <h3><a href="<?php echo $docLink; ?>" target="_blank">Download</a></h3> </div> </li><?php endwhile; ?> </ul> <?php else : // no rows found endif; ?>
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Not working with Advanced Custom Fields Repeater Fields’ is closed to new replies.