Block markup not working inside WP_Query
This won’t work as you expect it, PHP is intended for server rendered blocks, it isn’t aware of the editor context unless it’s told the context. But to do that you need to read it in and pass it to the component on the JS side, and then read it in again on the PHP … Read more