Hello, I have a basic question for Sage 9, no Bedrock.
I’m trying to setup the normal, boring ACF Blocks, no custom plugins that I know some of you have. I’m using this guide.
The first thing I’ve done is add the following to my setup.php
file:
function register_acf_block_types() {
// register a testimonial block.
acf_register_block_type(array(
'name' => 'testimonial',
'title' => __('Testimonial'),
'description' => __('A custom testimonial block.'),
'render_template' => 'app/Blocks/Testimonial/testimonial.php',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array( 'testimonial', 'quote' ),
));
}
// Check if function exists and hook into setup.
if( function_exists('acf_register_block_type') ) {
add_action('acf/init', 'register_acf_block_types');
}
I get the following error though:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'register_acf_block_types' not found or invalid function name in /app/public/wp-includes/class-wp-hook.php on line 286
I feel this should be a very simple thing, but I’m not sure what’s going on. My Sage theme doesn’t seem to want to communicate very well with the main WordPress files or plugins. Any suggestions?