3. #WCATH2019
Register the Gutenberg block
Which are the steps?
Create custom fields with ACF
Export fields to JSON y PHP
Create HTML/CSS to render the block
4. <?php
function wcath_create_talk_gb_block() {
// register a testimonial block
acf_register_block( [
'name' => 'talk',
'title' => __( 'Talk', DOMAIN_NAME ),
'description’ => __('Block with basic info of the talk.', DOMAIN_NAME),
'render_callback' => 'talk_block_render_callback',
'category' => 'wcathens',
'icon' => 'image-filter',
'mode' => 'auto',
'keywords' => [ 'talk', 'quote' ],
'enqueue_style' => get_template_directory_uri() . 'blocks/testimonial/
testimonial.css',
] );
}
add_action('acf/init', 'wcath_create_talk_gb_block');
5. #WCATH2019
Register the Gutenberg block
Which are the steps?
Create custom fields with ACF
Export fields to JSON y PHP
Create HTML/CSS to render the block
8. #WCATH2019
Register the Gutenberg block
Which are the steps?
Create custom fields with ACF
Export fields to JSON y PHP
Create HTML/CSS to render the block
9. #WCATH2019
Register the Gutenberg block
Which are the steps?
Create custom fields with ACF
Export fields to JSON y PHP
Create HTML/CSS to render the block