<div id="do-scroll" class="questions-loop">
							<?php 
global $current_user;
$current_user_info = cjtheme_user_info($current_user->ID);
if (have_posts()) {
    ?>
									<div class="panel-group" id="home-qna-accordion" role="tablist" aria-multiselectable="true">
										<?php 
    $count = 1;
    while (have_posts()) {
        the_post();
        $post_info = cjtheme_post_info($post->ID);
        $user_info = cjtheme_user_info($post_info['post_author']);
        $user_profile_url = site_url('members/' . $user_info['user_nicename']);
        $user_role_level = cjtheme_user_role_display($user_info);
        $read_more_link = '<a href="' . get_permalink($post->ID) . '">See more</a>';
        $post_cat = wp_get_object_terms($post->ID, 'qna_type');
        if ($post_cat) {
            $post_cat = '<a href="' . get_term_link($post_cat[0]->term_id, 'qna_type') . '">' . $post_cat[0]->name . '</a>';
        } else {
            $post_cat = '';
        }
        ?>
											<div id="question-<?php 
        echo $post->ID;
        ?>
" class="question panel panel-default">
												<div class="panel-heading" role="tab" id="heading-<?php 
        echo $count;
        ?>
                ?>
" class="username"><?php 
                echo $comment_author_info['display_name'];
                ?>
</a>
													<span class="user-stats">
														<span class="stat"><i class="fa fa-thumbs-up"></i> <?php 
                echo cjtheme_user_likes_count($comment_author_info['ID'], 'likes');
                ?>
</span>
														<span class="stat"><i class="fa fa-star"></i> <?php 
                echo cjtheme_user_likes_count($comment_author_info['ID'], 'thanks');
                ?>
</span>
														<span class="stat"><?php 
                echo cjtheme_user_role_display($comment_author_info['ID']);
                ?>
</span>
													</span>

													<br>
													answered this question<br><i><?php 
                echo cjtheme_time_ago(strtotime($answer->comment_date));
                ?>
</i>
												</div><!-- /.user-meta -->
											</div><!-- /.user-info -->

											<div class="answer-content">
												<span class="arrow"></span>
												<?php 
    function cartoq_comment_template($comment, $args, $depth)
    {
        global $current_user;
        $GLOBALS['comment'] = $comment;
        $classes = array('comment', 'answer', 'clearfix');
        switch ($comment->comment_type) {
            case '':
                ?>
				<li <?php 
                comment_class($classes);
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
					<?php 
                if ($comment->user_id) {
                    $user = get_userdata($comment->user_id);
                    $username = $user->user_nicename;
                    $profile_url = site_url('members/') . $username . '/';
                }
                ?>

					<div id="comment-<?php 
                comment_ID();
                ?>
" class="comment-body clearfix">
			
			
						<figure class="comment-avatar">
							<a href="<?php 
                echo $profile_url;
                ?>
">
								<?php 
                echo get_avatar($comment, 70);
                ?>
							</a>

							<figcaption>
								<span class="user-stats">
									<span class="stat"><i class="fa fa-thumbs-up"></i> <?php 
                echo cjtheme_user_likes_count($user->ID, 'likes');
                ?>
</span>
									<span class="stat"><i class="fa fa-star"></i> <?php 
                echo cjtheme_user_likes_count($user->ID, 'thanks');
                ?>
</span>
									<span class="stat"><i class="fa fa-crown"></i> <span class="label label-info"><?php 
                echo cjtheme_user_role_display($user->ID);
                ?>
</span></span>
								</span>
							</figcaption>
						</figure>
			
			
						<div class="comment-main">
			
							<header class="vcard clearfix">
								<?php 
                printf(__('<cite class="fn">%s answers:</cite>', 'cartoq'), get_comment_author_link());
                ?>
								
								<aside class="comm-edit">
									<a class="comment-date" href="<?php 
                echo htmlspecialchars(get_comment_link($comment->comment_ID));
                ?>
">
										<?php 
                echo cjtheme_time_ago(strtotime($comment->comment_date));
                ?>
									</a>
									<?php 
                edit_comment_link(__('Edit', 'cartoq'), '  ', '');
                ?>
								</aside>
							</header>
			
							<div class="comment-text">
								<?php 
                comment_text();
                ?>

								<?php 
                if ($comment->comment_approved == '0') {
                    ?>
									 <em><?php 
                    _e('Your comment is awaiting moderation.', 'cartoq');
                    ?>
</em>
									 <br />
								<?php 
                }
                ?>
							</div>

							<?php 
                $likes = cjtheme_activity_comment_likes($comment->comment_ID);
                $thanks = cjtheme_activity_comment_thanks($comment->comment_ID);
                ?>

							<a href="#" class="like-thanks btn btn-link <?php 
                echo cjtheme_login_class('like-comment', 'cjfm-show-login-form');
                ?>
" data-redirect="<?php 
                echo cjtheme_current_url();
                ?>
" id="like-<?php 
                echo $comment->comment_ID;
                ?>
" data-comment-id="<?php 
                echo $comment->comment_ID;
                ?>
" data-user-id="<?php 
                echo $current_user->ID;
                ?>
">
								<i class="fa fa-thumbs-up"></i>
								<span class="likes-value">
									<?php 
                echo $likes > 0 ? $likes : '0';
                ?>
								</span>
							</a>

							<a href="#" class="like-thanks btn btn-link <?php 
                echo cjtheme_login_class('thank-comment', 'cjfm-show-login-form');
                ?>
" data-redirect="<?php 
                echo cjtheme_current_url();
                ?>
" id="thanks-<?php 
                echo $comment->comment_ID;
                ?>
" data-comment-id="<?php 
                echo $comment->comment_ID;
                ?>
" data-user-id="<?php 
                echo $current_user->ID;
                ?>
">
								<i class="fa fa-heart"></i> 
								<span class="thanks-value">
									<?php 
                echo $thanks > 0 ? $thanks : '0';
                ?>
								</span>
							</a>
							
							<?php 
                comment_reply_link(array_merge($args, array('depth' => $depth, 'before' => '<footer class="reply">', 'after' => '</footer>', 'max_depth' => $args['max_depth'])));
                ?>
							
						</div>
			 
					</div><!-- #comment-<?php 
                comment_ID();
                ?>
  -->
				</li><?php 
                break;
            case 'pingback':
                ?>
				<li <?php 
                comment_class();
                ?>
 id="li-pingback-<?php 
                comment_ID();
                ?>
">
					<?php 
                _e('Pingback:', 'cartoq');
                ?>
 <?php 
                echo get_comment_author_link();
                ?>
 <small class="ping-edit"><?php 
                ac_icon('edit');
                edit_comment_link(__('Edit', 'cartoq'), '  ', '');
                ?>
</small>
				</li><?php 
            case 'trackback':
                ?>
				<li <?php 
                comment_class();
                ?>
 id="li-trackback-<?php 
                comment_ID();
                ?>
">
					<?php 
                _e('Trackback:', 'cartoq');
                ?>
 <?php 
                echo get_comment_author_link();
                ?>
 <small class="ping-edit"><?php 
                ac_icon('edit');
                edit_comment_link(__('Edit', 'cartoq'), '  ', '');
                ?>
</small>
				</li><?php 
        }
    }
    ?>
				</span><!-- /.value-wrap -->
			</span>

			<h4 class="user-role">
				<div class="star-wrap">
					<i class="fa fa-star"></i>
				</div><!-- /.star-wrap -->

				<div class="inner-wrap">
					<span class="icon-wrap">
						<i class="fa fa-trophy"></i>
					</span><!-- /.icon-wrap -->

					<span class="role-name"><?php 
    echo cjtheme_user_role_display(bp_displayed_user_id());
    ?>
</span>
				</div><!-- /.inner-wrap -->

				<div class="star-wrap">
					<i class="fa fa-star"></i>
				</div><!-- /.star-wrap -->
			</h4><!-- /.user-role -->
		</div><!-- /.titles-wrap -->
	<?php 
}
?>

	<?php 
do_action('bp_before_member_header_meta');