Store data from nested block of gutenberg

I had checked everywhere except the save function (see updated question). I updated it as follows: <div {…blockProps}> <div className=”ea-accordion-panel–heading”> <RichText.Content tagName=”h2″ value={attributes.heading} /> </div> <div className=”ea-accordion-panel–content”> <InnerBlocks.Content /> </div> </div>

Gutenberg: how to hide server side render output in the editor but keep it in frontend?

This can be down in the php render_function. Check if it is an API REST request: function create_block() { register_block_type( __DIR__ ,[ ‘render_callback’ => ‘render_php’ ] ); } function render_php(){ if ( defined( ‘REST_REQUEST’ ) && REST_REQUEST ) { return “<p>Backend says hello from php</p>”; } else { return “<p>Frontend says hello from php</p>”; }; …

Read more