Hi guys!
I’m using ACF PRO for display an acf form on frontend, for publish content.
This content, just have a textarea, nothing else.
I noticed that acf_form_head(), bring many files (css and js) I don’t use in this form, for example, scripts for Google Maps, upload images, etc.
How can I disallow these files?
I would appreciate any help.
Thanks!
If you really want to remove the scripts, after acf_form_head() you can dequeue the scripts https://codex.wordpress.org/Function_Reference/wp_dequeue_script and css https://codex.wordpress.org/Function_Reference/wp_dequeue_style. Please note that I do not know what effect this will have on the operation of your front end forms. Many scripts rely on other scripts and removing any one of the could cause your form to stop working.
Thanks John,
I’ll test that solution. I hope works.
Thanks!
Thinking about it, you might want to add a filter on wp_enqueue_scripts with a high priority and do the dequeuing there. But some of the scripts are enqueued when the fields are added to be inserted into the footer. It could be a messy process figuring out where, when and what needs to be done.