i'm trying to build a navigation in which all posts are listed in a sidebar (all the time) -> but only the ones a user is allowed to see.
i tried to do this with wp_get_archives() which gives me a list of all posts - but i don't know how to filter restricted posts from here?
Another try was to simply build a "title only version" of the loop:
<?php if (have_posts()) : ?> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endwhile; ?> </ul> <?php endif;?>
This worked better for the first part, because it only showed me the posts i wanted to be listed. But if i clicked on a link to open a post (.../wordpress/?p=ID) the nature of the loop let's all the other listings disappear. Is there a way to stop this behavior? Or is there another way i should try?