Support » Fixing WordPress » Can't query a single private post?

  • I am having trouble trying to query a single private post. I have created a custom post type called dogs, some of which are published and some of which are private.

    I can query all of the dogs using the following code:

    $args = array ('post_type' => 'dog', 'post_status' => array('publish', 'private')); $male_q = new WP_Query($args);

    However, if I specify a name, for example:

    $args = array ('post_type' => 'dog', 'name' => 'bouncer', post_status' => array('publish', 'private')); $male_q = new WP_Query($args);

    then the query returns nothing.

    Any thoughts?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can't query a single private post?’ is closed to new replies.