WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the List Category Posts plugin, and it isn't listing posts marked private, even if the appropriate user is logged in. Is there a fix for this?

share|improve this question

List Category Posts plugin uses get_posts to actually get the posts and its default post_status is publish and that is way you won't get any private posts.

To "Fix" it you can edit the file named include/CatList.php of the plugin and add

$lcp_query .= '&post_status=private';

before line 51 before

$this->lcp_categories_posts = get_posts($lcp_query);

this will get you only private posts and to really "FIX" it you need to add this code:

    parse_str( $lcp_query, $lcp_query );
    $lcp_query['post_status'] = array('publish','private');

on line 51 again before

$this->lcp_categories_posts = get_posts($lcp_query);

and offer the author of the plugin this as a patch so the next time he updates you want lose this fix.

share|improve this answer
Hey, thanks for this answer! I'll add this into the next release of List Category Plugins. Thanks a lot for helping out! – Fernando Briano Mar 20 '11 at 18:07
@Fernando: Glad i can help. – Bainternet Mar 20 '11 at 18:34
Thanks @Bainternet! And thanks @Fernando for making this great plugin. – Senior Mar 25 '11 at 15:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.