So I’m trying to query a single specific post by ID in a query loop (the output from a API call) and I’m using this PHP query to test:
return [
'p' => 1940,
];
As simple as I’d think it gets but I’m not getting results from it? Maybe some fundamental WP/PHP thing I don’t know about? I did also try and do a meta query to no success as well.
I have no idea what happened but I turned off query loop and turned it back on and now it’s perfectly fine. Adding post_type didn’t work until I turned it off and on, and now it’s fine even without it.