<div class="content-heading comments-section" id="comment-section"><span></span></div>
	<div class="row sidebar">
		<div class="col-sm-6">
			<div class="widget purple">
                <h4 id="comments-title"><i class="glyphicon glyphicon-comment"></i><?php comments_number( 'No Responses', 'One Response', '% Responses' ); ?></h4>
            	<?php if(!have_comments()){ ?>
                <p class="nocomments"><?php _e( 'Be the first to leave a comment.', 'activehost' ); ?></p>
                <?php }
                if ( ! comments_open() ) : ?>
                    <p class="nocomments"><?php _e( 'Comments are closed.', 'activehost' ); ?></p>
                <?php endif; // end ! comments_open() ?>
				<ol class="comments-list">
                <?php
				if(isset($wplistcomments) &&  $wplistcomments == "on"){wp_list_comments();}
				$comments = get_comments('post_id='.get_the_id());
				foreach($comments as $comment) :?>
					<li class="row" id="comment-<?php echo esc_html($comment->comment_ID); ?>">
						<div class="col-xs-2">
							  <?php echo str_replace('96',"",get_avatar( $comment->comment_author_email )); ?>
						</div>
						<div class="col-xs-10">
                            <strong><?php echo esc_html($comment->comment_author); ?></strong>
                          <p><?php echo esc_html($comment->comment_content); ?></p>
                           <?php $post_id = get_the_ID();
								$comment_id = $comment->comment_ID;
								
								//get the setting configured in the admin panel under settings discussions "Enable threaded (nested) comments  levels deep"  
								$max_depth = get_option('thread_comments_depth');
								//add max_depth to the array and give it the value from above and set the depth to 1
								$default = array(
									'add_below'  => 'comment',
									'respond_id' => 'respond',
									'reply_text' => __('Reply', 'activehost'),
									'login_text' => __('Log in to Reply', 'activehost'),
									'depth'      => 1,
									'before'     => '',
									'after'      => '',
									'max_depth'  => $max_depth
    );
                    // comment_reply_link($default,$comment_id,$post_id);  ?>
                        </div>
                      </li>
				<?php endforeach; ?>
                </ol>
                <?php paginate_comments_links();?>
            </div>
         </div>
         <div class="col-sm-6">
              <div class="widget">
                   <?php comment_form(); ?>
               </div>
         </div>
      </div>