Ainfographie.com logo animé

Custom WordPress Gutenberg Editor Blocks with Advanced Custom Fields

  1. Accueil
  2. Blog
  3. Tutoriels WordPress
  4. Custom WordPress Gutenberg Editor Blocks with Advanced Custom Fields

There are lots of great options out there for extending the WordPress Gutenberg block editor, either by the way of plugins or by rolling up your sleeves and coding up your own from scratch. However, with Advanced Custom Fields and a little PHP you can whip up your own custom blocks and build just about any you can imagine. In this video we’ll explore together the options ACF provides while building a simple staff block.

— UPDATE! —
Fixing the missing image in the block preview: I should have been using the ID number of an image from the Media library instead of a URL. Since the preview uses my template for rendering, the value I should have included for the image was an integer (number).

So not this: “https://mysite.com/path/to/image.jpg”

But this: 5 (or whatever ID corresponds to the desired image in the Media library)

LINKS (some are affiliate links):
ACF Custom Gutenberg Blocks: https://www.advancedcustomfields.com/resources/acf_register_block_type/
AHD GeneratePress Child Theme: https://github.com/addisonhall/generatepress-child
GeneratePress: https://generatepress.com/?ref=144&campaign=YouTube

Vous devez vous connecter pour publier un commentaire.
Menu