admin管理员组文章数量:1122832
I am trying to Remove rel="ugc"
from links in comments, but nothing is working. I even tried Remove rel="nofollow ugc" from links in comments
I also tried many plugins like: UGC comment, External Link, but nothing is working.
I am trying to Remove rel="ugc"
from links in comments, but nothing is working. I even tried Remove rel="nofollow ugc" from links in comments
I also tried many plugins like: UGC comment, External Link, but nothing is working.
Share Improve this question edited Apr 7, 2024 at 13:19 cjbj 15k16 gold badges42 silver badges89 bronze badges asked Apr 7, 2024 at 7:24 JimmyJimmy 1 1- The solution in that post removes the rel when the comment is displayed in a page, but it will still be visible in the comment as it is stored in de the database. Is that a problem? – cjbj Commented Apr 7, 2024 at 12:28
1 Answer
Reset to default 2The rel=ugc
is added by a default filter on pre_comment_content
. You can disable this by adding the following line to your functions.php
:
remove_filter ('pre_comment_content', 'wp_rel_ugc', 20);
This may not be wise. If at some point you change your mind, you would have to go through all comments to add it. It is problably better to use the solution to which you link. This one lets the filter add rel=ugc
when the comment is saved into the database and only removes it every time the comment is displayed on a page.
本文标签: filtersRemove relquotugcquot from links in comments
版权声明:本文标题:filters - Remove rel="ugc" from links in comments 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736311196a1934654.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论