Last active
August 29, 2015 14:15
-
-
Save aliciaduffy/32191674fa96400fe995 to your computer and use it in GitHub Desktop.
Comment count check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a name="respond"><span style="display: none;">Respond</span></a> | |
<div id="peta_comments"> | |
<?php | |
// Get comment count | |
$comment_count = wp_count_comments( get_the_ID() ); | |
// If there are comments, display note and comments | |
if ( $comment_count->approved > 0 ) { ?> | |
<h6>Commenting is closed.</h6> | |
<div class="clear"></div> | |
<!--Comment List--> | |
<ul class="list_comments"> | |
<?php wp_list_comments( $list_comment_args ); ?> | |
</ul> | |
<div class="pagination"> | |
<?php paginate_comments_links( array('prev_text' => '« Prev', 'next_text' => 'Next »', 'type' => 'list')); ?> | |
</div> | |
<?php } ?> | |
</div> | |
<!--End Comment List--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment