Support

Account

Home Forums Front-end Issues ACF has disappeared from frontend? Reply To: ACF has disappeared from frontend?

  • This is how I’ve registered the block types in my function file:

    add_action(‘acf/init’, ‘my_acf_init_block_types’);
    function my_acf_init_block_types()
    {

    if (function_exists(‘acf_register_block_type’)) {
    acf_register_block_type(array(
    ‘name’ => ‘Video header’,
    ‘title’ => __(‘Video header’),
    ‘description’ => __(‘Video header’),
    ‘render_template’ => ‘template-parts\blocks\video-header.php’,
    ‘category’ => ‘formatting’,
    ‘icon’ => ‘admin-comments’,
    ));
    acf_register_block_type(array(
    ‘name’ => ‘Text with button’,
    ‘title’ => __(‘Text with button’),
    ‘description’ => __(‘Text with button’),
    ‘render_template’ => ‘template-parts\blocks\text-with-button.php’,
    ‘category’ => ‘formatting’,
    ‘icon’ => ‘button’,
    ));
    acf_register_block_type(array(
    ‘name’ => ‘header Image’,
    ‘title’ => __(‘header Image’),
    ‘description’ => __(‘header Image’),
    ‘render_template’ => ‘template-parts\blocks\header-images.php’,
    ‘category’ => ‘formatting’,
    ‘icon’ => ‘dashicons-format-image’,
    ));
    acf_register_block_type(array(
    ‘name’ => ‘header Main Image’,
    ‘title’ => __(‘header Main Image’),
    ‘description’ => __(‘header Main Image’),
    ‘render_template’ => ‘template-parts\blocks\header-main-img.php’,
    ‘category’ => ‘formatting’,
    ‘icon’ => ‘dashicons-format-image’,
    ));
    }
    }