I want to include the personalized HTML output of the field type in the template on the front end. Right now I define the visual part of the output in a template file, now I try to include that code in the plugin so I can render it in the template by calling get_field().
Is there a method similar to render_field() for rendering the field on the front end?
Note: I created a Openlayers backend map to store latitude and longitude values. Now I want to output a map with the marker position in the template.
oh, you want the script to be enqueued on the front end. That needs to be done when the field is output on the front end. You can either include inline code in the formatting or you could enqueue the script when it is formatted.
Viewing 6 posts - 1 through 6 (of 6 total)
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