Bird
0
0

How can you register a block that uses server-side rendering instead of saving static HTML?

hard📝 Application Q9 of 15
Wordpress - Shortcodes and Blocks
How can you register a block that uses server-side rendering instead of saving static HTML?
ASet <code>save</code> to <code>null</code> and create a PHP render callback
BSet <code>edit</code> to return null
COmit the block name in registerBlockType
DSet <code>title</code> to 'Server Rendered Block'
Step-by-Step Solution
Solution:
  1. Step 1: Understand server-side rendering in blocks

    Blocks that render on the server set save to null and define a PHP render callback.
  2. Step 2: Check other options

    Returning null in edit or omitting name/title does not enable server rendering.
  3. Final Answer:

    Set save to null and create a PHP render callback -> Option A
  4. Quick Check:

    Server render = save null + PHP callback [OK]
Quick Trick: Use save:null and PHP callback for server rendering [OK]
Common Mistakes:
  • Returning null in edit instead of save
  • Omitting block name
  • Changing title only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes