I want to put some text above the comment button.
I use the following function :
function c_stackoverflow() {
echo 'text';
}
add_action( 'comment_form_after_fields', 'c_stackoverflow' );
It works properly, But when I move the comment textarea field to the end of the fields using the following code, The desired text is placed above the comment textarea field, How to put the desired text at the end of the comment textarea field above the send comment button?
function c_ccc( $fields ) {
$comment_field = $fields['comment'];
unset( $fields['comment'] );
$fields['comment'] = $comment_field;
return $fields;
}
add_filter( 'comment_form_fields', 'c_ccc' );
With a little effort and thought, I found another solution :
function c_ccc( $fields ) {
$comment_field = $fields['comment'];
unset( $fields['comment'] );
$fields['comment'] = $comment_field;
$fields['comment'] .= 'text';
return $fields;
}
add_filter( 'comment_form_fields', 'c_ccc' );