$output .= "<li>".(($result->comment_author_url) ? "<a href="".$result->comment_author_url."">" : "").$result->comment_author.(($result->comment_author_url) ? "</a>" : "")." (".$result->comments_count.")</li>";
edit:
to show the avatar before the name:
$output .= "<li>".get_avatar($result->comment_author_email, 45).' '.(($result->comment_author_url) ? "<a href="".$result->comment_author_url."">" : "").$result->comment_author.(($result->comment_author_url) ? "</a>" : "")." (".$result->comments_count.")</li>";
Related Posts:
- Remove Comments Metabox but still allow comments
- How can I remove the title “leave a reply” in the comment box in twentyeleven?
- change the comment time output to: X time ago instead of actual date and time
- How to get comments with mixed status using get_comments?
- How to prevent deleting of comments when deleting a post
- disable comments if array exists
- Remove “says” from comments
- Display the number of user comments
- Comments to only be seen by their author
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Change the HTML of the comment form that is generating somewhere from the core WordPress
- Commenter should see only his comments in wordpress
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- wp-comment author- url +, email filter hook
- Where to add the permalink in this function?
- Incorrect redirect after commenting
- comments_popup_link without echo?
- Getting comment count per post not working
- Wp admin – Set default value to 999 in comments
- What is the Difference in bones_comments() and comments.php
- Function to replace comment’s accented characters before posting
- WordPress comment_form() does not display actual comments
- WordPress comment processing . Default unapproved comments detection before posting
- How do I change where “You must be logged in to comment” directs users?
- How do I make the comment disappear after deleting from the database?
- Remove nofollow from internal comment links via functions.php
- How can I automatically delete comments that contain a URL?
- Warning and fatal error
- Comment function for page
- How to identify author in wordpress comments?
- How can I return the result of my custom function?
- Newest comments first not working
- get_comments not working properly after WordPress v4.4 update
- Getting error while trying to use custom comment function
- Increase Comment Author Gravatar Size On WordPress Default Comment Function
- Custom Nested WordPress Comments with avatar
- Undo a function that is not (seemingly) hooked to an action?
- Comment Function
- WP Custom Comment Callback Not Responding
- How to remove “login to reply” from individual comments [duplicate]
- Getting full code of wp_list_comments instead of replacing it
- Comment turned Invisible
- User’s Comments Number: Storing it in a meta field for different uses
- Add functionality to block comment authors in the Comment edit pag
- Excluding iPad from wp_is_mobile
- paginate_links() don’t properly work in search.php?
- How can I get $id variable in widget’s form function?
- difference between add_object_page and add_menu_page
- How to hook into the quick edit action?
- Make WordPress size and name images for Retina.js
- How to programmatically set a menu to be the Primary Menu?
- Pinterest Integration Using functions.php
- Trying to inject twitter metadata into using wp_head action in functions.php – get_the_excerpt() returns null
- how to edit functions.php in a child theme
- Only display link to author social media when it exists [closed]
- Get current page_id before loop, in functions.php
- Menu fallback “menu_class” rendering a “div” instead of a “ul”
- Create single.php for specific tag by tag id or name
- function to erase swear words
- Right way to update widget on dynamic new input field
- custom rss templete
- Remove elementor header and display default theme header
- enqueue styles for only mobile wp
- WordPress PHP Conflicting User Sessions
- Registration Hooks don’t appear to be working
- How to use selected WordPress functions?
- Change slug shortlink “/?p=” base in WordPress
- New functions in separate directory — better, portable way
- How to Add Shortcode to html img code?
- Logout Redirect and also WP-login.php Redirect
- Proper Way to Load stylesheet on Condition
- How do I place a function in a standalone page?
- Problem in using Customizer
- Ajax resetting my global variable
- Conditional custom menu?
- What function actually renders the wp_admin_bar ? How can I call it?
- Do I Need to Prefix Variables Inside Functions?
- Detect Ajax call inside pre_get_posts function
- Render page with specific id from functions.php
- Display Child Pages if no child Exists Display Siblings
- How to show ACF value under post/page title in wp-admin
- What is wp_get_post_tags for media tags?
- Filter works on last selection but no others
- get_current_user_id() always return 0 in if else statement
- How do i tweak my wp Post title base on category of the post
- Why isn’t comment validation working?
- I’m creating a online store for my website, my aim is to add description to products in home page only how can i achieve it?
- Menu and category highlighting for a single post
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- True email confirmation for registration (keeping unvalidated users from user table)
- Code I am placing in the wp_footer is going outside the entire HTML frame!
- How to use if (is_page_template (”))
- wordpress function through ajax not being called
- How to assign results to variables?
- Hide certain post types from editors
- Automatically add custom fields (post_meta) to all published posts, hourly, via wp_cron?
- How to mirror exactly the left admin menu on front end?
- Make a table out of meta box
- is_user_logged_in() isn’t working
- How to automatically load Google Fonts on pages only as they’re used?