What you can do is edit the comments.php file so that the link only appears if they’ve entered a site.
In your comments.php page, you’ll should find some code which is along the lines of
<a href="<?php comment_author_url(); ?>"><?php comment_author();?></a>
You can wrap this in an if check like thus:
<?php if ('' != get_comment_author_url()) { ?>
<a href="<?php comment_author_url(); ?>"><?php comment_author();?></a>
<?php } else { comment_author(); } ?>
Now, the name will no longer be hyperlinked if they didn’t leave a URL.
Unfortunately that doesn’t solve the problem. When a user signs up their author url is automatically being set to http:// if they don’t input anything into that field , so http:// then goes into the data base under that users user_url and then for every comment that user makes into the comment’s commont_author_url field. I need stop it from auto inserting http://, which I presume would require editing some of WP’s core files, which I can do without removing anything important, but I can’t seem to find the right one.
Fixed it. Just needed to remove ” ‘http://’ .” from “$newuser_url = preg_match(‘/^(https?|ftps?|mailto|news|gopher):/is’, $newuser_url) ? $newuser_url : ‘http://’ . $newuser_url;” in profile.php