I am using the ACF Pro Repeater Fields for a project with the location as a Block. The block successfully loaded on the edit page but it not being rendered to the front end.
Here is the code I used to test the page Template:
`//Register a Building Projects Block add_action('acf/init', 'my_acf_init_block_types'); function my_acf_init_block_types() {
// Check function exists.
if( function_exists('acf_register_block_type') ) {
// register a building project block.
acf_register_block_type(array(
'name' => 'building_projects',
'title' => __('Building Projects'),
'description' => __('A custom block for Building Projects.'),
'render_template' => get_template_directory() . '/template-parts/blocks/building-projects/building-projects.php',
'category' => 'formatting',
'icon' => 'building',
'keywords' => array( 'building', 'nodaco' ),
));
}
}
// Load values and assign defaults.
$sub_text = get_sub_field('project_descriptions') ?: 'Detail Project here...';
?>
I also echoed with this line of code: echo($sub_text);`