This function calls all comments by an author and strips every comment to a max-length. Adjust the comment excerpt length when calling the function in your template like wpse19316_author_comments( 100 );
.
function wpse19316_author_comments( $length )
{
$final_length = (int) $length;
$author_comments = get_comments( array( 'ID' => $GLOBALS['authordata']->ID ) );
foreach ( $author_comments as $comment )
{
$comment_length = sublen( $comment->comment_content );
$comment_excerpt = $comment->comment_content;
if ( $comment_length > $final_length )
$comment_excerpt = substr( $comment->comment_content, $final_length );
echo $comment_excerpt.'<br />';
}
}
Related Posts:
- Display Authors Comments on Profile Page
- Why are the comments disabled by default on my custom_post_types?
- Why are comments and trackbacks still getting through for custom post types?
- Getting a list of custom posts by author
- List all posts commented by current user
- the_author_posts_link() for authors of custom post types
- Custom Comment Types
- Adding %author% in custom post type URL structure?
- modify all posts of a category to “no comments allowed”
- Custom comment status possible?
- Author archive only for custom post type
- feed links for custom post type pages
- Custom loop for custom post type for current author
- Seperating custom post type comments from regular blog posts comments
- Add comments meta fields to comments metabox on post edit screen
- Exclude post_type from admin comments_list
- Show Custom Post Type by Author
- wp_query and comment_parent – select only posts with top level comments
- changing default comment form arguments [duplicate]
- Comment moderation on custom post types
- Automatically check “Allow comments” for custom post type [duplicate]
- Get the terms of a custom taxonomy for a specific author in author template
- Prevent author role from editing all posts in custom post type?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- How could I create a ‘private comments’ section on a custom post type?
- Disable comments from showing up public for Custom Post Type
- Custom Post Type loops and Disqus
- How to fetch custom post by Author?
- WP-Admin edit.php & post.php slowdown after import of 10k users
- “Allow Comments” box cannot be checked
- Check if author or current user has posts published
- Get Author for Single Post in Custom Post Type
- How do I prefix blog post urls as mysite.com/blog/%postname%/ but allow authors to still be located at mysite.com/authors/%nicename%?
- Separate comment section for post type in dashboard
- How can I show a custom post type for users in the authors.php file?
- WordPress post count not showing for custom post type author
- Count all comments of a custom post type
- How Can I Set the Post Author of a Post I Just Created With PHP?
- Custom Post Type and Labels
- Filter post by current 2 differents users id
- custom comments on specific post type
- Insert data on comment post
- How to only show posts assigned to current user, only in certain post types
- get_attached_media() on author page not working
- get_comments not working on custom post types
- Custom Post Type Set Comments ON by default without show METABOX
- WordPress comments_open for specific user role or post type
- Permit users with author role to edit a custom post type
- URL rewrite add author as base
- Add custom field in comments form
- Create another comment system for CPT
- Edit the author of custom post type
- Can multiple authors be assigned on a single custom post?
- How can the recipients and content for comment email notifications on a custom post type be changed?
- How to restrict author to only access one custom post type ?
- How to show featured image block in custom post type for Author?
- Convert comments to Custom Post Type
- How to assign classes to all elements?
- custom comments form for custom post type
- What functions does WordPress use for filtering / sanitizing comments?
- comment_notification_text filter for custom post type
- Author posts not appearing for custom post type
- Display an authors post on a single page only when they are logged in
- get comments by current user inside page template
- User-submitted reviews of different custom post types
- Check if user has comment on current post
- Select other roles as custom post authors
- post body class for current user only if they are the post author
- Enable comments on custom page type – option not showing in “customize” for theme
- Allow anonymous comments just in a custom post type
- duplicate comment section functionality and call it something else for custom post types
- Restrict category access to specific users/groups. Author always has access
- Send email messages after comment was submitted
- Find custom post type url by author
- Display latest posts of author in a custom post type
- Custom post type title of each author in his own post
- comments hooks on custom post type
- custom comment fields on CPT
- unapprove comments on custom post type
- get post count for related author
- Display author box on just certain category posts?
- Enable comments for post when comments meta box removed
- Display custom post counts for author , not default posts
- Get the latest comment from a custom post type where depth = 1?
- Use Author Ids or Names to echo different output inside loop
- Creating an option for writing a post without an author attribution for a group blog on WordPress
- Showing only posts from the current user who is logged in?
- “Author” custom post type
- Why will comments not remain open on custom post types?
- How to add comments to my custom post type but hide it from default WordPress Comments section?
- How to change the comments form title based on post type
- Comments on posts with new custom post type redirected to another post
- how to display author name in custom post type
- Limit custom post type to the authors only on front-end!
- Display custom posts, ordered by most commented, without duplicates
- How do I get all authors posts of a custom post type outside loop
- Why is wp_list_authors not picking up Authors from CPT’s?
- Need to display author’s email id in the “Edit post” field in wp dashboard. How do I do this?
- Delete Post by User
- get comments for custom post type