AdvancedCustomFields / acf

Advanced Custom Fields
http://advancedcustomfields.com/
824 stars 168 forks source link

Not seeing Gutenberg "blocks" listed in location rules #294

Open meijioro opened 4 years ago

meijioro commented 4 years ago

I copied the example from https://www.advancedcustomfields.com/resources/acf_register_block_type/ verbatim (code and template file) but I don't see the widget when I create a page.

add_action('acf/init', 'my_acf_blocks_init');
function my_acf_blocks_init() {

    // Check function exists.
    if( function_exists('acf_register_block_type') ) {

        // Register a testimonial block.
        acf_register_block_type(array(
            'name'              => 'testimonial',
            'title'             => __('Testimonial'),
            'description'       => __('A custom testimonial block.'),
            'render_template'   => 'template-parts/blocks/testimonial/testimonial.php',
            'category'          => 'formatting',
        ));
    }
} 
Edit_Page_‹_CDM_Website_—_WordPress

Nor do I see "Blocks" listed when I try to create a custom field.

Screen Shot 2020-05-06 at 3 00 27 PM

I'm on Wordpress 5.4.1 and ACF 5.8.9

elliotcondon commented 4 years ago

Hi @meijioro

ACF Blocks is a premium feature found in ACF PRO. Can you please confirm if you are using the free or PRO version of the Advanced Custom Fields plugin?

meijioro commented 4 years ago

Ok, I'm on the free version. The docs should probably be updated that the PRO version is required as others don't waste time.

nick6352683 commented 4 years ago

As a matter of fact the docs actually state that fact exactly, so only those who fail to comprehend, waste their time... Go to the ACF plugin page in wp.org, there is a paragraph with a title "Pro", and a link to "Learn more" about the Pro version, and the second thing listed there that the Pro version provides, are Blocks.