Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Hey, I still don't understand. In query 16 the post_name is set to 'my-life'. Which is the post I'm after. When I copy&paste this exact query into my MySQL console I retrieve the post I want. If I print out $wp_query the 'name' parameter is also set. Commented Sep 5, 2014 at 13:43
  • @ØleBjarnstroem Then you are probably hitting different edge case from the one I did. :) See, in two separate attempts we had hit at least two different edge cases here. Proving my point. :) Commented Sep 5, 2014 at 13:46
  • Well but where do I create a new query then? I never arrive at the single.php because it immediately goes to 404... Commented Sep 5, 2014 at 14:24
  • @ØleBjarnstroem My point is primarily that you are going to have horrible issues querying non–public post status, no matter how for front display. Been there, done that, got shit from a boss for years after. :) It's just something WP doesn't do well. Commented Sep 5, 2014 at 14:48