This removes the tag before it displays the comment on the page. I tested it myself.
function remove_ugc_from_links($text) {
// replace 'rel="ugc"' with an empty string
$new_text = str_replace('rel="ugc"', '', $text);
return $new_text;
}
// Hook our function to the 'comment_text' filter
add_filter( 'comment_text', 'remove_ugc_from_links');
Related Posts:
- Editing the Comment Reply Link
- Add option to disable comments on a per posts basis?
- Paginate result set from $wpdb->get_results()
- Change Comment Author Display Name
- How to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit?
- Threaded comments – deleting parent comment leads to orphan comments
- How to remove commenters ability to add hyperlinks to comments?
- How can I edit the email sent when a new comment is received?
- How to remove or replace the log-in link for comment replies?
- How to Block Access to Standard Login Flow and Comment Flow
- Add Comment Custom Field
- Remove link preview in discussion dashboard
- Can’t add default comments to custom post type
- where to modify get_comment_author_link()?
- Does Akismet plugin expose any hooks, functions, class that can work with custom code?
- Comments Feed & Custom Post Statuses
- Multiple Comment Forms in a single page [closed]
- Displaying comments with a walker: how to distinguish between parent and child comments
- Count parent comments & replies separately?
- How to modify comments form using comment_form()?
- Capability for allowing user to post own comments without moderation
- Comment count wrong with orphaned comments
- Comment form problem with comment_author_url and HTML5 input placeholders
- How would I count the number of times a comment meta field’s value is in a post’s entire comments?
- Get comment content by comment ID
- stackexchange-like submit comment window
- Retrieve comments from current post using SQL
- Display recent comments with gravatar and excerpts?
- Cannot get local avatars to show [closed]
- Limit user to one comment
- Is comment metadata included in the export file?
- Get a List of All Commenters on the Current Post
- WordPress comments on users profile
- wordpress threaded comments – customize nested ul / how child ul is displayd
- How to make a secure blog that is completely private?
- identify and delete spam comments from 3000 pending comments
- Hide comments column in WordPress backend
- Removing the limit on the number of nested comments
- How to call my custom WordPress Comment form without getting the comments?
- How to moderate (manually approve) comments of a specific (registered) User
- Auto delete comment if Contains
- How would I add the comment count to this sub-pages of current page snippet
- How can I test why the comment hook is not working?
- How do i remove “Website” field from WordPress comments
- Placed on + only date (not time)
- Loading Comments From a Class?
- WordPress comments work locally only?
- comment reply by email
- have_comments not true for logged out visitors?
- “Discussion” checkboxes unchecked by default on pages? [duplicate]
- How to disable or hide WordPress.com as a social media login option for Jetpack Comments [closed]
- How to limit comment indentations to one level?
- Anonymize comments after one year
- Minimum allowed comment length only on a specific page
- How can get comment id from comment link?
- How can I count only guests comments?
- Comment System showing different type of IP
- Pending Comments
- Only Allow post author and “Premium” Role user to comment
- Anonymous spam comments when only registered users can comment
- Exclude the word comment from being referenced
- How to open up comments to all visitors
- Limit iframe output in comment-meta commentmetadata
- Is this a wordpress bug? get_comment_link auto shoots when user visits his dashboard
- Comment as post – understanding wp_list_comments
- Comments and pingbacks issues
- Cannot unapprove a WordPress comment
- Automatically register users with comments
- Comments only displaying when logged in
- Same comment section on every page
- reply comment below the comment box without reload page
- Force to show all fields in comment forms to the logged-in users
- Unable to view comments on my website
- Write html code in comments
- Using WordPress core pop-up comment function, doesn’t popup, maybe an elementor issue
- How to post one comment for all the translated posts
- How do i add comment fields in my page in WordPress
- twenty seventeen theme: comments UI not visible
- How do I alter the comments form in several different ways?
- comment_moderation_subject is not working for me
- Adding restrictions to open comments
- Custom Comment Form Error Messages
- Disqus comments only show up on newest post
- wp_trash_post retrashes already trashed comments?
- Comment notification not working
- How to maintain changes to comment-template.php
- wp_insert_user email confirmation
- Comments appear in wrong posts
- use a page to render 1 post and include comments FOR THE POST
- Can I use wordpress comments system to build a user review system within my website?
- Incude comments in search
- Show count comments under the title
- Numbering only parent comments
- How to show recent comments on WordPress homepage with post title?
- Merge comments from Facebook with WP comments [closed]
- Remove “#comments” from comments pagination url
- How to hide and disable URL and email fields from comments?
- Preferred method to get comment reply link for comments with a depth of 0
- How to remove email id & website box in wordpress comment
- Easily invalidate form in comment_post hook