Hello,
I have problem with that function, it create everything inside wp blocks and there looks ok but when i open my website i see only this:
<div class="single-post__content-fulltext">
<!-- wp:acf/newsletterbox {
"id": "block_61280380b14b4",
"name": "acf\/newsletterbox",
"data": {
"tytul": "Bądź na bieżąco dodaj swój e-mail do newslettera",
"_tytul": "field_6127eff7849b1",
"opis": "",
"_opis": "field_6127effd849b2",
"tresc_na_przycisku": "Dodaj",
"_tresc_na_przycisku": "field_6127f002849b3",
"tresc_na_polu_do_uzupelnienia": "Adres e-mail",
"_tresc_na_polu_do_uzupelnienia": "field_6127f008849b4"
},
"align": "",
"mode": "preview",
"wpClassName": "wp-block-acf-newsletterbox"
} /--> </div>
This is how it looks inside functions.php
// Register blocks for editor
if( function_exists('acf_register_block_type') ) {
add_action('acf/init', 'my_acf_init_block_types');
}
function my_acf_init_block_types() {
// register a testimonial block.
acf_register_block_type(array(
'name' => 'newsletterbox',
'title' => __('Newsletter'),
'description' => __('Szablon z formularzem newslettera'),
'render_template' => 'templates/gutenberg/newsletter.php',
'icon' => 'admin-comments',
'keywords' => array('newsletter'),
));
}
I was looking for answer but didnt see anyone with problem like me.