With version 2.4 of ACF Theme Code Pro, you can now easily generate code to use ACF Blocks in your projects!
Simply follow the steps below:
- Install ACF Theme Code Pro v2.4 (you can download from your account area)
- Browse to Custom Fields > Tools
- Create a name for your block & copy the code
- Paste the code into functions.php & customise as needed
- Create a field group for your block and set your new block as it’s ‘location’
- Create a ‘template part’ PHP file for your new block
- Copy the Theme Code into your new Template part file
- Wrap the Theme Code in HTML and enhance with CSS or JS!
Screenshot of the Tools Page with ACF Block Registration Code Output
Screenshot of the Field Group page (with block code output)
Some other improvements included in version 2.4
- Support for WordPress 5.2
- Support for ACF PRO 5.8
- Radio Button field (core): Add support for all return types
- Refactoring that will allow for the more options for the code generated in the future
New third party fields now supported in version 2.4
- ACF Icon Field
- ACF Star Rating Field
- ACF Color Palette Field
- ACF Image Aspect Ratio Crop
- ACF Color Swatches
- ACF SVG Icon
Find out more about ACF Theme Code Pro