Function Name: wp_rel_ugc()
Supported Version: WordPress 5.3+
What is rel UGC attribute?
UGC stands for User Generated Content, a rel attribute value recommended for links where the content was generated by user like comments or forum posts and Google made an announcement on Sept 10, 2019 for “ugc” link attribute value support.
In WordPress 5.3, a new function was introduced which help developers add both “nofollow” and “ugc” values to the rel attribute, see sample code below:
$url = '<a href="https://samplewebsite.com/comments/123">user forum comment</a>'; $ugc_url = wp_rel_ugc( $url ); echo $ugc_url; // output: <a href="https://samplewebsite.com/comments/123" rel="nofollow ugc">user forum comment</a>
We’ve tried our best to explain everything thoroughly, even though there’s so much information out there. If you found our writing helpful, we’d really appreciate it if you could buy us a coffee as a token of support.
Also, if you’re interested in learning more about WordPress, Javascript, HTML, CSS, and programming in general, you can subscribe to our MailChimp for some extra insights.
At this time it looks like BlogEngine is the preferred blogging platform available right now.
(from what I’ve read) Is that what you’re using on your blog?
Hi there, I wish for to subscribe for this webpage to obtain newest updates, thus where
can i do it please assist.