Created
September 4, 2011 08:19
-
-
Save yoavf/1192509 to your computer and use it in GitHub Desktop.
Subscriber only page template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
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