Wordpress: WP_Query search criteria on 'post_name'
Instead of
'post_name' => 'rebecca-atkinson',
use:
'name' => 'rebecca-atkinson',
In addition to my answer in the comments above, I thought I'd post it as an official answer too:
I have to use 'name'
and NOT 'post_name'
.
For example:
'name' => 'rebecca-atkinson'
Hope this helps someone in future.