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
- 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?
- Using filter to add additional fields to comment_form()
- Programmatically block commenting by restricting view of comment form
- 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?
- How do I display the commentor’s first name and last name in the comments?
- 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
- 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
- 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?
- 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
- Display complete comment section via post ID
- 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?
- Use of comment_reply_link_args filter
- Only Allow post author and “Premium” Role user to comment
- Add comment_meta to wp_comment_reply
- unsetting required fields in the comment reply form
- Get Comment Author ID on the fly while posting
- How to filter comments by comment_meta
- How can I hide comment of the authors from their published posts?
- Cannot Remove Title Reply from Custom Comment Template for Signup Page
- Edit Comments Fields
- Same comment section on every page
- Update post “A” on comment submition on post “B”
- Upload avatar for post comment
- How to display replies to his comments in user profile of current user
- reply comment below the comment box without reload page
- Comment author profile image
- Force to show all fields in comment forms to the logged-in users
- Top rated posts Average rating issue
- Comment Form Fields when user logged in
- Attaching author tag to the comment
- Check if comment author has url
- How to make comment reply available only for login members of a certain user roles only?
- Comments counter only for Authors Posts
- How to call out the date of user’s first comment?
- How to pass settings to comment_form() if theme only uses comments_template()?
- edit comments in front end
- How to replace anonymous comment form with a registration form on wordpress?
- How to add a class to comment submit button?
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- How to enable truly anonymous posting in bbPress forums? [closed]
- Comments pagination on author page
- Change author, disable comments, enable trackbacks for all items in library
- Comment section not appearing on posts
- Prevent author from editing comments from others in their post
- reply to comment excerpt instead of author in comment title
- Adding restrictions to open comments
- URLs to user page is broken
- wp-editor-area textarea disapear on cancel-comment-reply-link click
- How to ‘If Author’ Comments Check
- Display Comment Form on dedicated Page for each post
- Need an advice about comments
- Actual comments not showing, but form is?
- How to remove or customize “Comment” in comments form?
- How do I convert users who put an email and username for a comment into registered users? [duplicate]
- Clicking Comment “Reply” Button only replies to first comment
- Merge comments from Facebook with WP comments [closed]
- Why default comment fields don’t show up?
- How to enable truly anonymous posting in bbPress forums? [closed]
- How to hide and disable URL and email fields from comments?