Skip to content

Cannot render my block outside edit mode #46241

Answered by t-hamano
C0casio45 asked this question in Q&A
Discussion options

You must be logged in to vote

I think save.js defines the markup to be stored in the database. It will be output as static markup on the front end, so it will not work as a React app.

If the API you have prepared is accessible in PHP and the block is not reactive on the front end, you could access the API with the render_callback function and render the results dynamically.

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by C0casio45
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@t-hamano
Comment options

@C0casio45
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants