Browse Source

fix comment type query

windhamdavid 11 months ago
parent
commit
27be49ead1
2 changed files with 7 additions and 7 deletions
  1. 5 4
      comments.php
  2. 2 3
      inc/template.php

+ 5 - 4
comments.php

@@ -4,12 +4,13 @@
 <div id="comments" class="comments-area">
 	<?php if ( have_comments() ) : ?>
 		<ul class="commentlist">
-			<?php wp_list_comments( array( 
+			<?php wp_list_comments( array(
+        'type' => 'comment',
 				'callback' => 'dw_comment',
-				'style' => 'ul', 
+				'style' => 'ul',
 				'avatar_size' => 50,
 				'short_ping' => true
-				) ); 
+				) );
 			?>
 		</ul>
 		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
@@ -35,4 +36,4 @@
 			'url' => __( 'URL' ),
 		)
 	); ?>
-</div>
+</div>

+ 2 - 3
inc/template.php

@@ -294,12 +294,11 @@ endif;
 if ( ! function_exists( 'dw_comment' ) ) :
 function dw_comment( $comment, $args, $depth ) {
 	$GLOBALS ['comment'] = $comment; ?>
-	<?php if ( '' == $comment->comment_type ) : ?>
+	<?php if (get_comment_type() == 'comment') : ?>
 	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
 		<div id="comment-<?php comment_ID(); ?>">
 		<div class="comment-author vcard">
-			<?php echo get_avatar( $comment, 64 ); ?>
-			<?php printf( __( '<cite class="fn">%s</cite><span class="says">:</span>', 'daw' ), get_comment_author_link() ); ?>
+			<?php printf( __( '<cite class="">%s</cite><span class="says">:</span>', 'daw' ), get_comment_author_link() ); ?>
 		</div>
 		<?php if ( $comment->comment_approved == '0' ) : ?>
 			<em><?php _e( 'Your comment is awaiting moderation.', 'daw' ); ?></em>