Bird
0
0

How can you make a custom Gutenberg block support alignment options like wide and full width?

hard📝 Application Q9 of 15
Wordpress - Content Management
How can you make a custom Gutenberg block support alignment options like wide and full width?
AInclude 'alignment: true' in the edit function return JSX.
BSet 'alignWide: true' in the save function.
CUse CSS classes only without block settings.
DAdd 'supports: { align: true }' in the block registration settings.
Step-by-Step Solution
Solution:
  1. Step 1: Recall block registration supports property

    To enable alignment options, use the supports object with align set to true.
  2. Step 2: Understand where to add this

    This is added in the block registration settings, not inside edit or save functions.
  3. Final Answer:

    Add 'supports: { align: true }' in the block registration settings. -> Option D
  4. Quick Check:

    Alignment support = supports: { align: true } [OK]
Quick Trick: Use supports: { align: true } to enable alignment [OK]
Common Mistakes:
  • Trying to add alignment in JSX
  • Using CSS only without block support
  • Setting alignment in save function

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes