-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp_reset_query() in a block doesn't work #7427
Comments
Is your code snippet a fully working example? I'm having a hard time recreating this |
Yes, I reduced this to all necessary parts. And yes, this definitely was happening and I remember debugging it down to the usage of I don't have time to test this again now, if you believe this is not happening you can close this and I can reopen this later if it'll be happening. |
With the above code present when I try to edit a
page
like:http://localhost/wp-admin/post.php?post=111&action=edit
Then that URL redirects me to some other ID (of some
post
):http://localhost/wp-admin/post.php?post=222&action=edit
In other words
wp_reset_query();
didn't restore$post
? How can I make a custom query in a PHP render callback?Gutenberg 3.0.1
The text was updated successfully, but these errors were encountered: