Ecommerce Shopify WordPress Discussion

Remove author link from recent comments widget

1st of all, I know how to add custom widget, BUT! I want to use default WP widget of recent comments. And by default the author's name - is a link to his URL, or on his page on this site... like : site.com/author/author_name . I'm looking for hook to remove this. On front-end it looks like: <a class="wp-block-latest-comments__comment-author" href="site/author/authorname/">authorname</a> I found in /wp-includes/blocks/latest-comments.php some condition: $author_url = get_comment_author_url( $comment ); if ( empty( $author_url ) && ! empty( $comment->user_id ) ) { $author_url = get_author_posts_url( $comment->user_id ); } And anyway in that @name@ - link.... how to remove this? Make some like: <b>Authorname</b> I tried a bunch of methods and no effect... add_filter( 'get_comment_author_link', 'remove_comment_author_link', 10, 3 ); function remove_comment_author_link( $author_link, $author, $comment ) { return esc_html( $author ); } no effect This hook can change URL: function recents_comments_output_change( $url, $id) { $url = get_comment_link($id); return $url; } add_filter( 'get_comment_author_url', 'recents_comments_output_change', 10, 3); But how to remove? This hook can remove NAME, from URL....but not URL... function remove_comment_author($author, $comment_ID, $comment) { return ''; } add_filter('get_comment_author', 'remove_comment_author', 10, 3);
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.