I was working on a legacy project recently that had a multiple Advanced Custom Fields – field groups registered with PHP. It was difficult to edit these hard coded field groups so I decided it was best to switch these to JSON. I ran the snippet below once, it converts each of the field groups from […]
First register a API key for Google Maps then include the following snippet to register the key with ACF. This snippet has two parts — one part defines a constant containing the key, the other hooks into the Google Map ACF field and set the key on the fly.
Register top-level ACF options page Use this snippet to register a top-level menu item to house your custom fields as options. Register sub-level options pages If you need sub-pages, build on the previous snippet using the following example. These snippets can go in either a plugin or your theme’s functions.php file – whatever makes the […]
Source: https://www.advancedcustomfields.com/blog/acf-pro-5-5-13-update/
This site was created by Hookturn, the team behind ACF Theme Code Pro. If you are interested in contributing or have an extension to add, email us.
Awesome ACF is sponsored by the very awesome team at Pressidium. If you need reliable, secure and scalable Managed WordPress Hosting, check them out.