Inner Blocks for code reduction

Publié le: 04 janvier 2023
sur la chaîne: DPlugins
427
17

Gutenberg InnerBlocks for Code Reduction — When (and When Not) to Use Them

Part of the no-React block series: build an ACF-powered card block, then refactor part of it into an InnerBlocks region so editors can drop in flexible content (a quote, a paragraph, a YouTube embed) without you hardcoding every variation in advance — plus the one real limitation you need to know.

In this video:
• Create an ACF-based card block with image, title and content fields
• Build the front-end markup with plain HTML/SCSS, no React
• The problem: hardcoded fields can't flex when different cards need different content types
• Replace a field with InnerBlocks so editors can insert any block (quote, paragraph, embed)
• The catch: only ONE InnerBlocks region per block — no multiple independent inner areas

⏱ Chapters
0:00 When to use InnerBlocks
0:18 Create the ACF card block
1:06 Build the HTML/SCSS structure
7:45 The problem: rigid fixed fields
8:15 Replace a field with InnerBlocks
9:06 Insert flexible content (quote, embed)
9:54 Limitation: only one InnerBlocks region

✅ Scripts Organizer: https://dplugins.com/products/scripts...
✅ ACF Addon: https://dplugins.com/products/scripts...

———
🔧 DPlugins — WordPress tools for Gutenberg, Tailwind CSS & visual builders (Bricks, Oxygen): https://dplugins.com
👇 Questions or feature requests? Drop them in the comments.

#WordPress #Gutenberg #DPlugins


Sur cette page du site, vous pouvez voir la vidéo en ligne Inner Blocks for code reduction durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur DPlugins 04 janvier 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 427 fois et il a aimé 17 téléspectateurs. Bon visionnage!