• Hi all!

    I’ve been working on this site where a photographer wants some of his pages password protected. plus, these posts must NOT show when i build a post list.

    is there any way i can exclude password protected posts from get_posts() ?

    thanks alot for your future input.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The User Access Manager plugin does that. There are also a couple of other, similar plugins.

    Thread Starter macarrier

    (@macarrier)

    thanks but I’d like it to be plugin independent. if I don’t find any other solution, I’ll look at it. I must add that this is a custom made theme and that my client is not tech savy.

    up to now, I used these arguments with my get_posts() :

    $args = array(
    ‘orderby’ => ‘post_date’,
    ‘order’ => ‘DESC’,
    ‘posts_per_page’ => $options[‘num_posts’],
    ‘post_type’ => ‘post’,
    ‘post_status’ => ‘publish’,
    ‘post_password’ => ”
    );

    I used << ‘post_password’ => ” >> hopping it would force WP to get only empty password posts, but it’s a no go. any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘private password protected posts?’ is closed to new replies.