Reply To: Code line in comments

Home Forums WordPress Themes – Premium Pure & Simple Code line in comments Reply To: Code line in comments

#22759
Sushil Adhikari
Moderator

Hi

Please add this following code on child theme functions.php file

add_filter( 'wp_list_comments_args', 'pure_simple_child_comment_arg' );
function pure_simple_child_comment_arg($r) {
	$r['callback'] = 'puresimple_comment_child';
	$r['avatar_size'] = 48;
	$r['short_ping'] = true;
	return $r;
}


function puresimple_comment_child($comment, $args, $depth) {
	$GLOBALS['comment'] = $comment;
	extract($args, EXTR_SKIP);

	if ( 'div' == $args['style'] ) {
		$tag = 'div';
		$add_below = 'comment';
	} else {
		$tag = 'li';
		$add_below = 'div-comment';
	}
	
?>
	<  id="comment-">
	
	<div id="div-comment-" class="comment-body">
	
	
<?php printf( __( '%s','puresimple' ), get_comment_author_link() ); ?>
comment_approved == '0' ) : ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
<?php }

Note: Please use child theme functions.php file to add this custom css, otherwise your changes will lost on theme update.

Thank