Created
December 5, 2015 01:12
-
-
Save dcooney/01282eb182734b3601e9 to your computer and use it in GitHub Desktop.
Comment - Full Example
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
<?php get_header(); ?> | |
<div id="loop-container" class="loop-container"> | |
<?php | |
// The loop | |
if ( have_posts() ) : | |
while (have_posts() ) : the_post(); | |
get_template_part( 'content' ); | |
if(comments_open()) : | |
echo '<footer id="comments" class="comments">'; | |
// comments_template(); // Removed in favor of Ajax Load More | |
$comment_count = get_comment_count($post->ID); | |
if ($comment_count['approved'] > 0) : | |
echo '<h3 class="comments-number">Comments ('. $comment_count["approved"] .')</h3>'; | |
echo do_shortcode('[ajax_load_more comments="true" comments_post_id="'.get_the_ID().'" comments_per_page="4" comments_style="ol" comments_callback="ct_ignite_customize_comments" pause="true" button_label="Load Comments" button_loading_label="Loading Comments..."]'); | |
endif; | |
comment_form(); // Standard WP Comment form | |
echo '</footer>'; | |
endif; | |
endwhile; | |
endif; | |
?> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi