Blocks unavailable when new WP_Query
is used inside render callback
#8035
Labels
[Type] Help Request
Help with setup, implementation, or "How do I?" questions.
[Type] Plugin Interoperability
Incompatibilities between a specific plugin and the block editor. Close with workaround notes.
Describe the bug
Use of a
new WP_Query
throws no errors, but breaks admin render of blocks using them.To Reproduce
Steps to reproduce the behavior:
new WP_Query
over aget_posts
orget_recent_posts
functionpost_content
does, in fact, save the block data as expected and front-end render is fine. This effects only admin-facing blocks.Potentially Related
#5572
#7427
#4733
Expected behavior
Reload/return to post, should see Gutenberg block.
Screenshots
Block added:
Refresh (when
new WP_Query
is used instead ofwp_get_recent_posts
):Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: