I was using the twentytwentythree theme so there was 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 funciton fails to change the "Post Comment" text. Any recommendations?