Skip to content

Instantly share code, notes, and snippets.

@shahadat014
Last active August 29, 2015 14:17
Show Gist options
  • Save shahadat014/8f34699702ba9edde05c to your computer and use it in GitHub Desktop.
Save shahadat014/8f34699702ba9edde05c to your computer and use it in GitHub Desktop.
for wordpress comments
//call function.php
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
//call single.php
<?php comments_template( '', true ); ?>
// or you see Down single.php
<div class="row">
<div class="col-lg-8">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_post_thumbnail('post-thumbnail'); ?>
<?php the_content(); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
<?php else : ?>
<h2>4o4 error page not found!</h2>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment