Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( have_posts() ) :
- while ( have_posts() ) : the_post();
- $private = get_post_custom_values( 'private' );
- if ( isset($private[0]) && $private == 'true' ) {
- if ( current_user_can('subscriber') || current_user_can('administrator') ) {
- the_title();
- the_content();
- }
- } else { // this is visible to all
- echo 'O conteúdo desta página é privado.';
- }
- endwhile;
- endif;
- ?>
Add Comment
Please, Sign In to add comment