Support » Themes and Templates » List of Private Posts

  • Resolved lostgorilla

    (@lostgorilla)


    I have a site with a private area, I’m using WP-Sentry to help manage that with group access. There is a central page that redirects users after login to a dashboard type of page. I would like a list of the posts that are assigned to the category for these users, however the code below doesnt seem to grab the private posts.

    <ul>
     <?php
     global $post;
     $myposts = get_posts('numberposts=20&category=5');
     foreach($myposts as $post) :
     ?>
        <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
     <?php endforeach; ?>
     </ul>

    I can change the category to any other category ID and it pulls the proper posts, but when its changed to the private posts category nothing appears.

    Note that these posts show up on other pages when logged in as PRIVATE: but not when i call them by themselves. I should note that I am logged in when testing this, so thats not the problem.

    Anyone have any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List of Private Posts’ is closed to new replies.