SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    change wording above Comments form

    Hi folks.

    I'm using a Twenty Twelve child theme. URL here.

    I want to change the Comments "Leave a Reply" wording to "Make a comment". Simple enough, you'd think, but I've looked high and low and none of the recommendations I've come across on WP Support or elsewhere have worked. These have included making mods to the content.php and Comment.php files. I've still got the mod in the latter - as follows (my bolding):

    <?php comments_popup_link( '<span class="leave-reply">' . __( 'Make a comment', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>

    Just thought I'd point that out in case anyone was thinking that mod might do the trick - it doesn't!

    Would be appreciative of any advice, pls.

    Cheers!

  2. #2
    SitePoint Member
    Join Date
    Jun 2013
    Location
    Calgary, AB, Canada
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A search of the TwentyTwelve theme folder using NotePad ++ "Find in Files" for the term found the results below:

    Search "Leave a reply" (7 hits in 7 files)
    ..\www\wp352\wp-content\themes\twentytwelve\content-aside.php (1 hit)
    Line 23: <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    ..\www\wp352\wp-content\themes\twentytwelve\content-image.php (1 hit)
    Line 23: <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    ..\www\wp352\wp-content\themes\twentytwelve\content-link.php (1 hit)
    Line 21: <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    ..\www\wp352\wp-content\themes\twentytwelve\content-quote.php (1 hit)
    Line 20: <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    ..\www\wp352\wp-content\themes\twentytwelve\content-status.php (1 hit)
    Line 27: <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    ..\www\wp352\wp-content\themes\twentytwelve\content.php (1 hit)
    Line 28: <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    ..\www\wp352\wp-content\themes\twentytwelve\languages\twentytwelve.pot (1 hit)
    Line 98: msgid "Leave a reply"

    Looks as though there are a few places that would need to be changed.

    Cheers!
    Lyle

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot for you response, Lyle. Jeez, who'd a thought such a simple task would require so much messing around?

    So, just to clarify, you think I should change the 'Leave a reply' part in each of the files identified above, but nothing else?

    Cheers!

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick follow-up. I just found a mod that worked. Turned out to be very simple, and am posting it here for the benefit of others who might be wanting to change the "leave a reply" wording.

    Go to the Comments.php file, and find the following line (near the end):
    <?php comment_form(); ?>

    Change to:

    <?php comment_form(array(
    'title_reply' => 'Make a Comment',
    )); ?>

    Or, change the 'Make a Comment' to any other wording you want.

    Of course, goes without saying that you should be making such mods to a child theme, not directly to the original Twenty Twelve theme. You'll need to make a copy of the original Comments.php file and move it to your child theme before you apply the mod above.

    Cheers!

  5. #5
    SitePoint Member
    Join Date
    Jun 2013
    Location
    Calgary, AB, Canada
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You beat me to it! I was just going to post that as I too had just found it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •