Yes, I only allow comments to be views / posted by Level 4 subscribers. Everyone else will see a "marketing message" encouraging them to upgrade to Level 4 ... here's my page template that I modified from my selected theme (called page-right-sidebar.php):
- Code: Select all
<?php if (current_user_can("access_s2member_level4"))
{ comments_template('', true); } else { ?>
<hr />
<div class='promsg'><h2>Lifetime members get to participate in post discussions!</h2><br />
<p><b>This post currently has <?php comments_number('no responses','one response','% responses'); ?>.</b><br />Upgrade to Lifetime now to enjoy interaction with fellow members.<br />
<a href="http://mysite.com/membership_options_page">> Get Lifetime Membership</a></p></div>
<?php } ?>
Just for reference sake, here's the entire template so you can see where that fits in:
- Code: Select all
<?php
/**
* Template name: Single page with right sidebar
*
*/
get_header(); ?>
<div id="main_wrapper">
<?php if($e404_options['breadcrumbs']) : ?><div id="breadcrumb"><?php e404_breadcrumbs(); ?></div><?php endif; ?>
<div id="page-content" class="two_third">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if($e404_options['page_titles']) : ?><h2 class="fancy-header"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2><?php endif; ?>
<div id="post-<?php the_ID(); ?>">
<?php the_content(); ?>
<?php if (current_user_can("access_s2member_level4"))
{ comments_template('', true); } else { ?>
<hr />
<div class='promsg'><h2>Lifetime members get to participate in post discussions!</h2><br />
<p><b>This post currently has <?php comments_number('no responses','one response','% responses'); ?>.</b><br />Upgrade to Lifetime now to enjoy interaction with fellow members.<br />
<a href="http://mysite.com/membership_options_page">> Get Lifetime Membership</a></p></div>
<?php } ?>
</div>
<?php endwhile; ?>
<?php get_template_part('navigation'); ?>
</div>
<div id="sidebar" class="one_third last">
<?php get_sidebar('page'); ?>
</div>
<br class="clear" />
</div>
<?php get_footer(); ?>
Hope that helps!