• Resolved Jon Scaife

    (@jonscaife)


    Hi
    Thanks for the work on this plugin which I have used happily for several years now. I have a question/request due to a recent issue. If a comment author provides a link then their name gets linked to that link. I am happy for this link to appear on the main comments thread, but I would prefer the comment shown in the widget to not have this link.
    This is because the widget appears on every page on my site (500+ pages) and each has over 10 language translations so that’s over 5000 unique page addresses that all have the widget on them. The author of the comment is inadvertently creating 1000’s of backlinks to their link-address which may cause problems for them!
    Is there a way to turn this link off without turning it off globally in wordpress? If not – could this be added as a shortcode or option?
    Thanks for your help/insight

Viewing 1 replies (of 1 total)
  • Hi Jon,

    Sorry for the late late reply to this ticket. I missed the notification for some reason.

    You can do that, but it will require adding some code to your theme or child theme. There’s no direct option in the plugin unfortunately.

    The code you would need to add is:

    add_filter( 'better_recent_comments_comment_author_link', function( $author_link, $comment ) {
        return get_comment_author( $comment );
    }, 10, 2 );
    

    This will force the comment author to be displayed as plain text in the Better Recent Comments widget and shortcode, but it won’t affect the main comments list shown below your blog posts.

    Hope that helps!

    • This reply was modified 4 years, 10 months ago by Andy Keith.
    • This reply was modified 4 years, 10 months ago by Andy Keith.
Viewing 1 replies (of 1 total)
  • The topic ‘Author Link’ is closed to new replies.