This might have been asked plenty of times, but I just am unable to find a working solution.
I have made a custom post type: Events
Then I created a template events.php
I am very confused on how to show the custom post type ACF fields on my events page.
My setup is:
Show fields when custom post type = events
So the idea is that my editors are unable to edit pages. but only to add new content to certain post types.
My code in the events.php template is
<h3><?php get_field(‘my_event_field’) ?></h3>
The page is empty.
The only way I am able to retrieve the data is when I allow the ACF’s to display on the actual event.php template.
This is very confusing for my editors as they will see the Gutenberg design blocks too and it is bound for mistakes.
How do I ensure that my custom post types with ACF are being shown on the specific page templates I define, while keeping sure that the custom post types are the only place in the backend where my editors will be able to add data.
Thank you for your expertise.