Skip to content

Instantly share code, notes, and snippets.

@karks88
Last active September 11, 2024 15:58
Show Gist options
  • Select an option

  • Save karks88/576e9fc863469e692dc263281f67891f to your computer and use it in GitHub Desktop.

Select an option

Save karks88/576e9fc863469e692dc263281f67891f to your computer and use it in GitHub Desktop.
Register a Custom ACF Block
/* 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