How to remove comments date through php
-
I don’t really wanna use the css code .comment-metadata {display: none} to hide it I just need to remove it from php…
there is noting related to comments date in my custom theme comments.php to remove it from there and I don’t really wanna remove the following codes directly from wp-includes/class-walker-comment.php due to the future updates:
<div class="comment-metadata"> <a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>"> <time datetime="<?php comment_time( 'c' ); ?>"> <?php /* translators: 1: comment date, 2: comment time */ printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() ); ?> </time> </a> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .comment-metadata -->
I would also like to have the edit_comment_link in the given codes intact… having said that is there any way to remove it from somewhere in my function.php or anywhere else ?
P.S. I also tried some plugins but none of them worked !!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to remove comments date through php’ is closed to new replies.