I have a custom theme. There is no comments.php file, Wordpress is using whatever the default is. I need to modify the comments area, but I want to base my changes off of the default template. Where is the default template and how can I copy it into my own theme's comments.php?

UPDATE Sorted it out for myself. The following directory contains default fallbacks if a file is not specified in your custom theme - \wordpress\wp-includes\theme-compat\

I copied the comments.php file from there over to my custom theme and am ready to rock. I was told in a WordPress forum that this file is deprecated though and I should really be building my own.

  • So I gotta a little help from Wordpress forum. I had forgotten that I added comments to my blog by adding comments_template( '', true ); to my single.php file. So I probably need to override some comments code to get what I want. – mrtsherman Mar 17 '11 at 18:53
  • Please move your solution to answer (which you can accept later after bit of cooldown period) so it is in line with site's mechanics. :) – Rarst Mar 17 '11 at 22:36
  • @Rarst I can't find a mark answered button. Do I need to actually submit an answer and then accept it? – mrtsherman Mar 18 '11 at 14:53
  • yes, exactly. It's how site works so issue and solution are clearly separated. Otherwise your question will haunt us all with "unanswered" status. – Rarst Mar 18 '11 at 14:57

I got some help from Wordpress forum. As of Wordpress 3.1 a function called comment_form() creates the submit comment area. You can override default settings by creating an argument list and passing it in as a parameter. Here is a quick example where I change the default header Reply to Comment and then remove the acceptable tags section at bottom of form.

$comments_settings = array(                                                
    'title_reply' => 'Comment',
    'comment_notes_after' => ''

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.