Archived topic
How to remove rel=noreferrer to internal links in wordpress
1 reply · Started by sandeep kumar on December 23, 2021
Hi
How to remove rel=noreferrer in internal links.
I tried
//This code removes noreferrer from your new or updated posts
function my_links_control( $rel, $link ) {
return false;
}
add_filter( 'wp_targeted_link_rel', 'my_links_control', 10, 2 );
and
//This code removes noreferrer from your new or updated posts
function my_targeted_link_rel($rel_values) {
return 'noopener';
}
add_filter('wp_targeted_link_rel', 'my_targeted_link_rel',999);
Both these codes are not working for already published articles (not tested in new article)
Thanks
Hi there,
I would recommend checking with WordPress' support team on this as this is not a theme-related question.
If the code works in a Twenty series WP theme then it will work in GeneratePress.
Thanks for your understanding.