Skip to content

Instantly share code, notes, and snippets.

Created Sep 4, 2011
What would you like to do?
Subscriber only page template
Template Name: Subscriber only
get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php the_post(); ?>
<?php if ( current_user_can('read') ) : ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php else : ?>
This content is only available to registered users.
<?php endif;?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment