Changing the Post Comment button text
-
I’m hosting with DreamHost and embedding the page in a Google Site. Everything is working great. But I really want the “Post Comment” text on the button to change. I would also like to change the name above the comment box from “Comment *” to “Story”.
I am using the twentytwentythree theme so there was initially no functions.php file. I added a functions.php file. The entirety of the file is below:<?php function mycustom_comment_form_title_reply($defaults ) { $defaults['title_reply'] = __( 'Share a Story' ); return $defaults; } add_filter( 'comment_form_defaults', 'mycustom_comment_form_title_reply' ); function wpb_comment_reply_text( $link ) { $link = str_replace( 'Post Comment', 'Post Story', $link ); return $link; } add_filter( 'comment_reply_link', 'wpb_comment_reply_text' );
The first function works correctly and changes the “Leave a Reply” text to “Share a Story”. The second function fails to change the “Post Comment” text. Any recommendations? I was trying to follow this post for instructions:
https://www.wpbeginner.com/wp-themes/how-to-change-the-reply-text-in-wordpress-comments/The page I need help with: [log in to see the link]
- The topic ‘Changing the Post Comment button text’ is closed to new replies.