/** * Template Name: Pass-Prot * */ function only_password_protected($where) { remove_action('posts_where','only_password_protected'); return ' AND post_password != ""'; } add_action('posts_where','only_password_protected'); $protected = new WP_Query( array( 'post_type' => 'post' ) ); get_header(); if ($protected->have_posts()) { $form = true; while ($protected->have_posts()) { $protected->the_post(); if (!post_password_required($post)) { $form = false; the_title(); the_content(); echo '