Skip to content

Instantly share code, notes, and snippets.

@billerickson billerickson/functions.php Secret
Last active Jun 9, 2019

Embed
What would you like to do?
<?php
/**
* Register Blocks
* @see https://www.billerickson.net/building-gutenberg-block-acf/#register-block
*
*/
function be_register_blocks() {
if( ! function_exists( 'acf_register_block_type' ) )
return;
acf_register_block_type( array(
'name' => 'team-member',
'title' => __( 'Team Member', 'clientname' ),
'render_template' => 'partials/block-team-member.php',
'category' => 'formatting',
'icon' => 'admin-users',
'mode' => 'auto',
'keywords' => array( 'profile', 'user', 'author' )
));
}
add_action('acf/init', 'be_register_blocks' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.