Support

Account

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.