• We want to change the wording that appears on the Comment form below Leave a Reply. Our current theme is a locally created child of the twentyten theme. However, the wording I want to change is not in any of the files in the theme, which is under /wp-content. It is in this file:

    /wp-includes/comment-template.php

    I certainly understand how to change this file to say what I want – but how do I modify something that isn’t in the theme, so that it won’t be overwritten the next time I upgrade WordPress? The wording is part of the CSS class “comment-notes” (thank you, FireBug) but it LIVES in the PHP file I listed. Advice appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You would need to use a custom function with an action hook or an action filter, and place your custom function into the functions.php file in your child theme.

    http://codex.wordpress.org/Plugin_API

    no plugin needed, just add the corresponding code to comment_form() in comments.php of the theme;

    http://codex.wordpress.org/Function_Reference/comment_form

    also already answered in the forum:
    for instance: http://wordpress.org/support/topic/how-to-change-wording-of-leave-a-reply?replies=39

    Thread Starter hedera

    (@hedera)

    I’m confused. Our theme is a child theme and has no comments.php. The comments.php is in the parent theme twentyten; the last line of that file is this call:

    <?php comment_form(); ?>

    and that’s all it says about it. The reason we’re having this conversation is that the only place I could find the wording I want to change is in the /wp-includes/comment-template.php file. Do I just copy the whole function out of that file and put it into comments.php? And if I do that and change it will it override the in the template file? I’m sorry to seem ignorant but I’m not a PHP programmer.

    make a copy of comments.php from the parent theme and save it under the same name into the child theme folder; then edit.

    Thread Starter hedera

    (@hedera)

    I copied comments.php from my parent theme, copied to it the entire comment_form() code section from comment_template.php, and uploaded it to my child theme. The copied section went at the end of the file, after the line,

    <?php comment_form(); ?>

    When I refreshed the page, the entire comment section had vanished. What should I have done?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to change a display issue that isn't in a theme’ is closed to new replies.