I use the Members plugin to manage permissions on my site. For standard templates, it works great - when the user doesn't have permission to see a page, they get the following message:
Sorry, but you do not have permission to view this content.
How can I make sure I still get this message in my custom templates? Which tag do I need to include?
EDIT. Template source:
<?php
/*
Template Name: Stats
*/
?>
<?php
get_header();
?>
<div id="main">
<div id="contentwrapper">
<div class="topPost">
<h2 class="topTitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<div class="topContent">
<p>Listeners are counted every minute. The green line is the <b>maximum</b> during any given time period. The red area is the <b>average</b> number of listeners during the same time period.</p>
<h3>Listeners over the last hour</h3>
<img class="alignnone" title="Listeners over the last hour" src="<?php echo get_graph(60,60); ?>" alt="" width="481" height="149" />
<hr/>
<h3>Listeners over the last day</h3>
<img class="alignnone" title="Listeners over the last day" src="<?php echo get_graph(3600,24); ?>" alt="" width="481" height="149" />
<hr/>
<h3>Listeners over the last week</h3>
<img class="alignnone" title="Listeners over the last week" src="<?php echo get_graph(86400,7); ?>" alt="" width="481" height="149" />
</div>
<div class="cleared"></div>
<div class="cleared"></div>
</div> <!-- Closes topPost -->
</div> <!-- Closes contentwrapper-->
<?php get_sidebar(); ?>
<div class="cleared"></div>
</div><!-- Closes Main -->
<?php get_footer(); ?>
Note: The purpose of this template is to act as a front end for a shell script. Any content on the database is irrelevant, so there's no loop. (Though including a dummy loop didn't seem to help.)