Calling Wordpress experts

by 10 replies
12
I have a question for you. If I want to remove the url field from the comment section, is it ok to delete the following in comments-legacy.php??

<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small><?php _e('Website', 'woothemes') ?></small></label></p>
#website design #calling #experts #wordpress
  • You should never ever edit WP core files - only theme files!
  • Denden,
    The file comments-legacy.php is not a core file - in fact it is a theme-specific file and there should be no problem with editing it.

    Make SURE to BACKUP the current file before trying your edit, however! That way if there is ANY mess up, you can easily go back to the original version.

    Regards,
    Dave Seldon
    • [ 1 ] Thanks
  • Oops, sorry, Dave is right.
    • [1] reply
    • Well, I tried deleting it but nothing happened. Must've missed something...
      • [1] reply
  • Ah, yes, the problem is in wp_list_comments

    You can review Function Reference/wp list comments « WordPress Codex with an eye to setting up a custom function.

    There is also an interesting looking article at
    Remove url / website from wordpress comments | ChiaoCheng.com

    But it may be simpler to check out a couple of plugins:
    WordPress › disable-hide-comment-url « WordPress Plugins
    and
    WordPress › Disable Author Url and Comment Links « WordPress Plugins

    Hope this helps!

    Regards,
    Dave Seldon
    • [1] reply
    • Looks like I managed to do it!

      I went into author.php and removed the url part in there and it seems to have done the job, nothing broken.

      Thank you so much for your help

      That's one thing sorted, now onto another 'problem'...:rolleyes:
  • What I ALWAYS do when I'm editing wordpress files and I'm trying to delete something (since I know html way better than php), I'll just have Notepad open, highlight & copy the page code to it, then delete something, see if it rendered the result I was looking for, and if not, paste the original code back in there, and start again.
    • [1] reply
    • That's what I did otherwise I could've ended up in big trouble

Next Topics on Trending Feed

  • 12

    I have a question for you. If I want to remove the url field from the comment section, is it ok to delete the following in comments-legacy.php?? <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />