Home › Forums › General Issues › Generate PHP: How to save to file?
How can I save the code received with the Generate PHP tool to a file? Is there a an ACF action I can hook to so that when I generate the PHP it gets saved to a file?

What do you mean by code from Genereate PHP? Are you trying to enter PHP code into an ACF field and then save that code as a file?
I mean instead of having to copy & paste the code generated every time, I’d like that when I hit generate it saves that code to a file.

No, it’s the ACF tool which generates PHP or JSON code for the fields.

Are you talking about this https://wordpress.org/plugins/acf-code-generator/?
You’d need to contact the developer of that plugin.
No I am not talking about any other plug-in. You clearly haven’t used ACF before.

I have used ACF more than you will likely ever use it. Sorry if I misunderstood, but you’re explanation is rather unclear.
You are talking about the ACF Export Field Group Tool?
There is not way to save the export as a file other than to copy and paste it.
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.