Sage 9 , ACF Pro Blocks doesn't render template

Hello,

I am running into problems when trying to register a block with ACF Pro and Sage 9. The template markup doesn’t display.

  • I have used the acf_register_block_type() function in app\setup.php

  • Created Field Group in WP-Admin

  • Made the Block Template file

From WP-admin adding the block to the page it appears as it should with the name, description and fields etc…

However when posting the updates to the page the block doesn’t appear on the front website. None of the HTML from the template is there. Why is this?

Here is the related code that for registering the ACF block in app\setup.php

if( function_exists('acf_register_block_type') ) {
      add_action('acf/init', function() {

        // register a Hero block.
        acf_register_block_type(array(
            'name'              => 'hero',
            'title'             => __('Hero'),
            'description'       => __('A hero, big image background with text.'),
            'render_template'   => 'resources/views/partials/blocks/hero.blade.php',
            'category'          => 'formatting',
            'icon'              => 'admin-comments',
            'keywords'          => array( 'hero', 'big' ),
        ));

      });
}

Is it something to do with render template being a .blade.php file?

This topic was automatically closed after 42 days. New replies are no longer allowed.