Home Forums Feature Requests Easy "Copy PHP" button


Easy "Copy PHP" button

  • When hovering over a field while editing a field group, it would be nice if there was a link called “Copy PHP”. When clicked it would simple copy the PHP variable assignment for that field. For example, $my_text_field = get_field( 'my_text_field' ); would get copied to the clipboard, so you could easily paste it into your template. Or if you’re on an Options page, it would copy $my_text_field = get_field( 'my_text_field', 'option' );.

  • ACF does not offer any code automation to make it easy to add code to your templates. I would suggest checking out this plugin

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.