Template — episode/comments-off.php
templates/episode/comments-off.php
Empty placeholder template. Substituted by EpisodeCommentsGate in place of the theme’s comments.php when a show has the Enable WordPress comments on episode pages toggle turned off.
The default file contains only the ABSPATH guard — no markup, no output. This suppresses the comment section entirely rather than letting the theme render a “comments are closed” message.
Theme Override Path
{theme}/benecaster/episode/comments-off.php
When Benecaster routes to this template, it first checks for a theme-level override at the path above (using benecaster_locate_template()). If the override exists, it is used instead of the blank default.
Use this override when you want to render something in the comments area when comments are disabled — for example, a prompt to contact the podcaster directly, or a placeholder while deciding whether to enable comments.
<?php
// {theme}/benecaster/episode/comments-off.php
// Example: render a branded "no comments" message
defined( 'ABSPATH' ) || exit;
global $post;
$show_id = wp_get_post_parent_id( $post );
?>
<div class="episode-comments-off">
<p>Comments are not enabled for this show. Have feedback? <a href="<?php echo esc_url( get_permalink( $show_id ) ); ?>">Get in touch.</a></p>
</div>
Variables Available
No variables are extracted into scope before this template loads. Use WordPress globals ($post, $wp_query) and standard functions (get_the_ID(), wp_get_post_parent_id(), etc.) to access context.
When This Template Fires
filter_comments_template() in EpisodeCommentsGate applies when all three conditions are true:
- The current post is a
benecaster_episode - The episode has a parent show (
post_parent > 0) - The parent show’s
_benecaster_show_comments_enabledmeta isfalse(or absent while the show was explicitly configured to disable comments)
If comments are enabled for the show, this template is never loaded and your theme’s comments.php renders as normal.