r/ProWordPress • u/ClearanceClarence_AI • 1h ago
I made a WP_Query reference with a playground that runs your query in the browser
I did WordPress agency work for years and `WP_Query` was the thing I kept looking up. I'm not doing WordPress day to day anymore, but I still wanted to build the reference I used to wish I had.
It has every `WP_Query` parameter grouped on one page, with types, which version added it, and notes on the stuff that tends to bite you (empty `post__in` returning everything, `offset` killing pagination, `meta_query` needing the extra array, and so on). Each example has a copy button and a "Try it" button.
The "Try it" part goes to a playground page that boots WordPress in the browser using [WordPress Playground](https://wordpress.org/playground/), adds some sample content (posts, pages with children, a `movie` CPT with a custom taxonomy, some meta), and runs whatever `$args` you write. You get the matching posts, the SQL it generated, the resolved query vars, and warnings for common mistakes like typos in parameter names or using `showposts`. Nothing goes to a server, it all runs locally in your browser.
There's also a toggle to show all the code as `array()` or `[]`, since I know people feel strongly about that one.
It was inspired by luetkemj's wp-query-ref, which I think a lot of us had bookmarked at some point. This one is written from scratch and checked against current core (7.1).
It's free and GPL, no plugin and no paid version. If you want to try it, send me a DM and I'll pass you the link.
Since I'm not in WordPress every day anymore, I'm sure there are things I've missed or got wrong, so corrections are very welcome.