[Support request] How to remove rel=noreferrer to internal links in wordpress

Home Forums Support [Support request] How to remove rel=noreferrer to internal links in wordpress

Home Forums Support How to remove rel=noreferrer to internal links in wordpress

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2057380
    sandeep kumar

    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

    #2058085
    Leo
    Staff
    Customer Support

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.