• Resolved polyfade

    (@polyfade)


    I’m confused, if I register a new block with this plugin, shouldn’t this plugin create the files after being published?

    The YouTube video feels like it’s missing some details.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter polyfade

    (@polyfade)

    I get it. After you add a new block, hover over the block’s name, click the PHP link and copy/paste that code into the theme’s functions file.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    I think there’s a confusion. The video in the readme showcase the enhancements of the ACF Flexible Content field.

    In this topic, it looks like you talk about ACF Block Type, which is a feature of ACF that allow developers to easily integrate new Gutenberg Blocks with ACF fields (which is not the same as Flexible Content). More details here: https://www.advancedcustomfields.com/resources/blocks/

    If you talk about Gutenberg ACF Block Types, you don’t have to necessarily copy/paste the PHP code in your theme, as it will work out of the box when you create a new block in WP Admin > ACF > Block Types. Once your website go to production, you should however use the PHP code and remove the Block from the Block Type administration. This will improve performance a bit as you it strips one call from your DB.

    If you have other questions, feel free to join us on Slack! (You’ll find an invitation link in the readme).

    PS: The Block Type administration doesn’t create new files, you have to manually create those PHP templates/JS/CSS files in the path you’ve set for your block.

    Hope it helps ??

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Registering blocks’ is closed to new replies.