2009-09-19 10:11:37 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
Template Name: Members Only Blog
|
|
|
|
*/
|
2010-01-04 06:39:45 +00:00
|
|
|
get_header();
|
|
|
|
global $comicpress_options;
|
|
|
|
remove_filter('pre_get_posts','comicpress_members_filter');
|
|
|
|
include(get_template_directory() . '/layout-head.php');
|
2009-09-19 10:11:37 +00:00
|
|
|
|
2010-01-04 06:39:45 +00:00
|
|
|
if ($comicpress_options['enable_members_only']) {
|
|
|
|
if ($comicpress_options['members_post_category'] && comicpress_is_member()) {
|
|
|
|
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat='.$comicpress_options['members_post_category'].'&paged='.$paged;
|
2009-11-06 02:56:36 +00:00
|
|
|
|
2009-09-19 10:11:37 +00:00
|
|
|
$posts = query_posts($blog_query);
|
2010-01-04 06:39:45 +00:00
|
|
|
if (have_posts()) {
|
2009-09-19 10:11:37 +00:00
|
|
|
|
2010-01-04 06:39:45 +00:00
|
|
|
while (have_posts()) : the_post();
|
|
|
|
|
|
|
|
comicpress_display_post();
|
|
|
|
|
|
|
|
endwhile;
|
|
|
|
|
|
|
|
}
|
|
|
|
comicpress_pagination();
|
|
|
|
} else {
|
|
|
|
_e("This page is restricted to members only.",'comicpress');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
_e('Member\'s Only content is not enabled on this installation.');
|
|
|
|
}
|
2009-11-06 02:56:36 +00:00
|
|
|
|
2010-01-04 06:39:45 +00:00
|
|
|
get_sidebar('underblog');
|
|
|
|
|
|
|
|
include(get_template_directory() . '/layout-foot.php');
|
2009-09-19 10:11:37 +00:00
|
|
|
|
2010-01-04 06:39:45 +00:00
|
|
|
get_footer() ?>
|