Home › Forums › Gutenberg › No rendering in front end › Reply To: No rendering in front end
Alright, I completely forgot about that.
I hope it’ll help you but to resolve my problem it looks like I just changed the way to call my template.
add_action('acf/init', 'bwb_content_gallery');
function bwb_content_gallery() {
// Check function exists.
if( function_exists('acf_register_block_type') ) {
// register a testimonial block.
acf_register_block_type(array(
'name' => 'bwb_gallery',
'title' => __('Galerie Lexuberance'),
'description' => __(''),
'render_template' => './templates/blocks/gallery.php',
'category' => 'formating',
'icon' => 'schedule',
'keywords' => array( 'gallery', 'lexuberance' ),
'mode' => 'edit',
'enqueue_style' => get_template_directory_uri() . '/dist/css/blocks.css',
));
}
}
As you can see in “render_template” I directly put the path to the template I want to see and it does work.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.