Change ‘X thoughts on POST TITLE’ (singular/plural)
-
I have been having a look round the forums for a way to change ‘X thoughts on POST TITLE’ in the comments section and came upon a reply by Elvin (here).
This is meant to show either 1 comment or x comments depending on if there is just one comment or more. However, regardless of if there is only one comment or more it always shows as a singular (comment) as opposed to a plural (comments).
Is there any other way to achieve this based on Elvin’s snippet below?
add_filter( 'generate_comment_form_title', function(){ $comments_number = get_comments_number(); return sprintf( esc_html( /* translators: 1: number of comments, 2: post title */ _nx( '%1$s Comment on “%2$s”', '%1$s Comments on “%2$s”', $comments_number, 'comments title', 'generatepress' ) ), number_format_i18n( $comments_number ), get_the_title() ); });
Thank you in advance.
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘Change ‘X thoughts on POST TITLE’ (singular/plural)’ is closed to new replies.