Home › Forums › General Issues › Very basic question – ACF into single-post template
I’ve have an ACF field group for posts. I can add strings to the custom fields in the post. I can display the fields in the content area of the posts using Short Codes. But I want to display the fields outside of the content area and I want to do this in the single post template. Every tutorial I see they edit single-post.php or files within the theme, and they seem to be using WordPress Classic mode, and they seem to have an easy time getting a custom field to appear on the front end. My site is set up with blocks, using the block editor. Of course, this has a different way of editing the themes/patterns and I’ve seen no video tutorials that show ACF using this method.
And when I search around, the answer seems unusually complicated, especially compared to how easy it was to set up ACF and to get it working on the backend. This makes me feel like I’m missing something obvious. I don’t have the pro version of ACF yet, so maybe that’s it and maybe if I, did the answer would be easy? Or is it really that complicated?
Because I am able to pass these custom fields to other plugins, like Slider Revolution, etc, very easily. However, using the block editor, to get these fields to appear on the front end, it seems to involve editing the functions.php file and json file, etc. It seems I need the pro version? And I have to register a block like this:
https://www.advancedcustomfields.com/resources/acf_register_block_type/
And then I can add that block to a template and put PHP in there? Is that what needs to happen? Is it really that complicated? Or is there a tutorial I’m missing somewhere?
Sorry to say but, yes, it really is that complicated to use ACF with the block editor.
Another way that you can display field without needing to add ACF blocks is to build custom shortcodes and then use a shortcode block. With a custom shortcode you can do more than simply display the content of a field, you could include all the HTML and content in any way that you want it output.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.