The code in this tutorial shows you how to print custom field content on single posts and/or the Genesis blog page template. You can use any Genesis hooks to control the position custom field content is displayed.
This tutorial is based on this question from a new member :
Hi there, I just became a member and have a question that i can’t find an answer to.
The question is: I want to add custom fields using Advanced Custom Fields, which would appear on each blog post (and some of the fields would also appear on the Blog listing page itself). Can you help with where I put the code, please, as there doesn’t seem to be a single post php (or archive php) page in the theme’s code. I know how to insert the correct ACF code…i just don’t know where to put it. Thank you
The code enables you to print both text and images added using ACF’s image field.
The code also works if the ACF plugin becomes deactivated as it uses WordPress functions not ACF functions to output the value for different custom field types.
Here’s the code for logged in members:
Leave a Reply
You must be logged in to post a comment.