Remove comment author link from WordPress without plugin

Remove comment author link from WordPress

Remove comment author link from WordPress helps  keep comments form your blog cleaning from spam links left by automated or manual comment spammers without install plugin.

WordPress comments feature allows  commenters can add a link to own website. It’s good for those who want to discuss seriously, they deserve backlinks for their websites. But this feature is often misused  by spammers to promote their blog or product through spam comments.

This tutorial will help you Remove Comment Author Website Link in WordPress, please follow the steps below:

Open functions.php file in themes folder and add the following code

function mytheme_comment($comment, $args, $depth) {
   $GLOBALS['comment'] = $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->comment_author_email, 55 ); ?>

         <?php printf(__('<span class="fn">%s</span>'), comment_author()) ?> <?php $options = get_option('sensational'); if($options['mts_comment_date'] == '1') { ?>
	 <p><time><?php the_time('F j, Y'); ?></time></p>
	  <?php } ?>
      <?php if ($comment->comment_approved == '0') : ?>
         <em><?php _e('Your comment is awaiting moderation.') ?></em>
      <?php endif; ?>

      <div class="comment-meta commentmetadata">

	  <?php edit_comment_link(__('(Edit)'),'  ','') ?></div>

      <?php comment_text() ?>

      <div class="reply">
         <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>

If function mytheme_comment  already exist in functions.php fileyou can find find and replace




Next: Open comments.php file in themes folder, find and replace function:




If this is too difficult for you to do, there simply is install plugin Disable Author Url and Comment Links

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Are you human?: