There’s a filter called get_comment_author
that you can hook into to modify a comment author’s appearance.
add_filter( 'get_comment_author', function( $author, $comment_id, $comment ) {
// limit to first 10 characters
$author = substr( $author, 0, 10 );
return $author;
}, 10, 3 );
Related Posts:
- How to rearrange fields in comment_form()
- Removing the “Website” Field from Comments and Replies?
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- Change Comment Author Display Name
- comments reply script not working
- How to display comment form error messages in the same page
- Check If comment author is registered
- How do I set up real anonymous posting in bbpress forums? [closed]
- How to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit?
- Comment Author Name In Reply Form
- Deep customization of the comment form?
- Using filter to add additional fields to comment_form()
- Why are default comments deprecated?
- Display all comments or recent comments per user on author page
- Comments Reply Form
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- Comment form not showing up without comments
- Programmatically block commenting by restricting view of comment form
- How can comments be submitted when I don’t have a comment box on a page?
- Custom Field Added In Comment Form Not Showing In Edit
- how to make author to write comment on only his own posts?
- Add a drop down list to comment form?
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Making a Comment on a page without being on that page?
- customize comment form
- How to check if commenter is the_author?
- How do I display the commentor’s first name and last name in the comments?
- How to save new comment as custom comment type?
- WP comments form (custom) is displaying an extra comment field
- Let user edit his own comment
- How to modify comments form using comment_form()?
- How to add consent checkbox in comment section
- How to add enctype to multipart/form-data to comment form?
- Changing position of cancel_comment_reply_link and other elements of comment form
- edit comments capability for authors
- Publish a message on facebook after having posted a comment
- Edit Comment_Field while using T5 Comment Textarea On Top-Plugin
- Share comment to twitter after publishing [closed]
- Disable comments
- Why are authors allowed to approve comments on their posts? How to revoke privilege?
- How to add attributes to the comment form tag?
- Comment form connection to Gravity Forms
- Hide notifications regarding new comments
- List user comments in author page
- Auto-fill Custom comment fields
- The comment login form is visible to me but not to the user
- Author can only see own post comment and can moderate
- Change order of comment fields
- WordPress comments on users profile
- How to call my custom WordPress Comment form without getting the comments?
- Create comments.php form of custom HTML code
- How can I test why the comment hook is not working?
- How can I convert anonymous commenters into registered users?
- Comment displaying full name even after setting another display name?
- comment_post action hook running on page load instead of after a comment is posted
- Add class to comment form div when comment-reply button is clicked
- To whom do emails get sent via the WordPress comments form?
- Same email for all comments
- blank page after submitting a comment
- Display complete comment section via post ID
- Notify post author for a new comment on his post?
- Notification if Comment Author Field is left empty. E.g. change input border colour
- Assign author to comment from post edit page
- How to retain comment text on comment form after login/registration?
- Adding character count and limit in comments, modifying labels and fields – jetpack
- Check if comment was successfully submited
- Unique User for all visitor, but possibility to comment with unique name
- Ajax submit comments
- Why could my comment_form variable not be working?
- Display avatar with comment form?
- How many members have made comments approved for an article?
- Commentlist: bypostauthor problem with children list
- How to make comments private for commentor and post author
- Name of comment field differs on different sites
- Use of comment_reply_link_args filter
- Only Allow post author and “Premium” Role user to comment
- comment_notes_before not working
- Add comment_meta to wp_comment_reply
- How to create post comment from different domain
- Get comment id of the individual comments in comment list when modifying comment posted using comment text filter
- How can I embed comments plugin to my own website?
- Custom comment field not showing when logged-in
- Comments on future posts
- get_comment_meta not behaving as expected
- unsetting required fields in the comment reply form
- get_comment_author_link not working properly
- Returning error upon comment being flagged as spam
- Get Comment Author ID on the fly while posting
- Clicking Comment “Reply” Button only replies to first comment
- How to filter comments by comment_meta
- Changing the Comment Fields using Filter (without success)
- How can I hide comment of the authors from their published posts?
- Cannot Remove Title Reply from Custom Comment Template for Signup Page
- comment just attachment .. reply just text … can I do that?
- Custom sort comments with select form
- Edit Comments Fields
- Same comment section on every page
- Update post “A” on comment submition on post “B”
- Upload avatar for post comment