Last active
September 11, 2024 15:58
-
-
Save karks88/576e9fc863469e692dc263281f67891f to your computer and use it in GitHub Desktop.
Register a Custom ACF Block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Register Custom Blocks */ | |
| function my_acf_custom_blocks_register() { | |
| /** | |
| * We register our block's with WordPress's handy | |
| * register_block_type(); | |
| * | |
| * @link https://developer.wordpress.org/reference/functions/register_block_type/ | |
| */ | |
| register_block_type( __DIR__ . '/blocks/file-list' ); // File List Block | |
| } | |
| // Here we call our my_acf_custom_blocks_register() function on init. | |
| add_action( 'init', 'my_acf_custom_blocks_register' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment