0

I've been modifying the include/comment-temple.php file, and since that modification will vanish upon updates

Is there anyway to just simply copy the comment-template.php file from the included/ directory to my child theme directory, and modify the comment-template.php in there or how should I do?

Editing the core files are discouraged....

6
  • 1
    There are dozens of filters available to you in comment-template.php -- what specifically are you trying to do? If you're trying to affect how comments are displayed, you can add a file called comments.php to your theme.
    – Pat J
    Apr 28 '20 at 19:28
  • The problem is that I already has changed a few things here and there, mostly phrases and stuff, and I don't know how to write just them into the new comment.php, so that's why I'm wondering if it's possible to just copy the comment-template.php to the new child theme and rename it to comment.php. would that work?
    – JoBe
    Apr 29 '20 at 3:26
  • @PatJ .. and now there's a new version of WordPress out, and I can't update since it will overwrite the comment-template.php...
    – JoBe
    Apr 30 '20 at 4:34
  • Unfortunately, comments-template.php isn't a template file as such. It contains the functions WordPress uses to handle comments. It sounds like you'll need to work out a) what changes you've made, b) if and how you can implement them using the filter and action hooks available, and c) test your new solution on a different WordPress installation. If this isn't something you can do yourself, you might need to hire someone.
    – Pat J
    Apr 30 '20 at 13:40
  • @PatJ I think I need to hire someone, because I need help with a few more snippets, but where can I find people like that?
    – JoBe
    Apr 30 '20 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.