Code Snippets
Ready-to-use ACF code snippets. Copy, paste, ship.
php
Store ACF pro license key in WordPress PHP configuration
// Preview
php
How to update an ACF Google Map field programmatically using PHP
// Preview
php
Register a super simple toolbar for ACF's WYSIWYG field
Need a custom WYSIWYG toolbar configuration? Use this snippet.
// Preview
php
Load ACF JSON files from multiple locations
Use these snippets to load ACF JSON files from more than one directory
// Preview
php
Split an ACF Flexible content field into Template Parts
If you're working on a project with lots of Flexible content field 'rows' it can really help to break them into template parts
// Preview
php
Hide the ACF Admin Menu Item on Selected Sites
A snippet to hide the ACF 'Custom Fields' menu item from the wp-admin area.
// Preview
php
Convert an ACF Field Group from PHP to ACF-JSON
Use this snippet to convert legacy field groups from PHP to ACF-JSON files
// Preview
php
Register Google Maps API Key for ACF
Register & define a Google Maps API key to allow the location field to work correctly.
// Preview
php
Register an ACF Options Page
Use these snippets to register an ACF options pages
// Preview
php
Speed up ACF backend loading time
Drastically speed up the load times of the post edit page!
// Preview
Stay Updated
Get ACF tips and new extensions in your inbox
No spam. Unsubscribe anytime.