Created
April 19, 2018 17:33
-
-
Save nickihastings/eb5a98fc1968f31b839809e4ecf48995 to your computer and use it in GitHub Desktop.
Template file snippet to add ACF fields to a FooGallery template in order to display a gallery description. See this post:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//'foo_gallery_description' is the slug of the custom field. Second parameter is the current foogallery id. | |
<?php if(get_field('foo_gallery_description', $current_foogallery->ID)){ ?> | |
<div class="gallery-desc"> | |
<p><?php the_field('foo_gallery_description', $current_foogallery->ID); ?></p> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment