Beispiel #1
0
?>

<?php 
/* If there are no comments are given and comments/pings are closed and viewing a page, return. */
if (!have_comments() && !comments_open() && !pings_open() && is_page()) {
    return;
}
global $wp_query, $cpage;
$comments_by_type =& separate_comments($wp_query->comments);
$display_pings = false;
// set to true if you want to display trackbacks/pingbakcs
$cpage = $cpage > 1 ? $cpage : 1;
?>

<?php 
dp_comment_form(array('comment_notes_after' => ''));
?>

<?php 
if (!empty($comments_by_type['comment'])) {
    ?>
	<div id="comments">
		<div class="section-header"><h2 class="section-title" id="comments-title"><?php 
    comments_number(__('No Comments', 'dp'), __('1 Comment', 'dp'), __('% Comments', 'dp'));
    ?>
</h2></div>

			<ul class="comment-list">
				<?php 
    wp_list_comments(array('type' => 'comment', 'style' => 'ul', 'callback' => 'dp_comment_callback', 'avatar_size' => 48));
    ?>
Beispiel #2
0
        ?>
		</div>
	</nav>
	<?php 
    }
    ?>
	
	<?php 
    dp_comment_form();
    ?>
</section>
<?php 
} elseif (!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) {
    ?>
<section id="comments" class="nocomments">	
	<p class="no-comments"><?php 
    __('Comments are closed.', DPTPLNAME);
    ?>
</p>
</section>
<?php 
} else {
    ?>
<section id="comments" class="nocomments">

	<?php 
    dp_comment_form();
    ?>
</section>
<?php 
}