How To Remove Noreferrer in Wordpress

3

  • 69
  • 0
  • 0.389
  • Reply

  • Open in the desktop app ADD TO PLAYLIST

    ph1102

    Published on Mar 11, 2020
    About :

    Probably many of you have personal blogs, and some of you have own domain and probably using Wordpress as a background script for your site. For security reasons, Wordpress has implemented a bit "boring" addition to your links which can be very painful especially for affiliate marketers.

    It all about the external links on your website... So, if you are using the command for opening links in the new tab (target="_blank"), then will WP automatically add these two things to it rel="noopener" or rel="noreferrer" to "protect" your visitors from potentially redirect of your page to a malicious URL...

    As you know, affiliate programs need referral information to be transmitted and this is a big minus to all of us... So, there is a solution for this problem... The easiest one is to allow opening the link in the SAME tab, so without adding the target="_blank" part to your links...

    The second one is removing rel="noreferrer" part of the link from your Wordpress blog... As this is the thing that is integrated directly into WP, we need a way to "hack" this part... I have tried 2-3 plugins that "works", but they didn't work with my Wordpress version (5.3.2), so I suppose that development is abandoned earlier...

    So, the first step is going to your Wordpress theme and finding function.php file (and yes, BEFORE doing anything, make a backup of all things that you are changing)... Dashboard>>Appearance>>Theme Editor>>THeme Functions

    • Scroll down to the end of the file and add this code into it and click SAVE (Update File)
     //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);
    
    • Edit your existing links with noreferrer

    • Delete cache (if you have cache plugins) and check links on your frontend by looking into source page

    And that's it! I hope that it will work for you!

    ~ph~

    Vote for STEEM witnesses, NOW! Vote for any witness that doesn't run on a 0.22.5 version!

    You can do it here: https://steempeak.com/me/witnesses

    or here: https://steemworld.org/ scroll down to the bottom - on the left, you will see the "witness overview" button


    Music in video:
    Growing Up by Scott Buckley https://soundcloud.com/scottbuckley
    Creative Commons — Attribution 3.0 Unported — CC BY 3.0


    .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:.

    Don't forget to follow, resteem and browse my steempage to stay connected with all the great stuff!

    You can find me on ClickTrackProfit .:. Twitter .:. LBRY

    .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:.

    Tags :

    education ctp affiliate wordpress blog links

    Woo! This creator can upvote comments using 3speak's stake today because they are a top performing creator! Leave a quality comment relating to their content and you could receive an upvote worth at least a dollar.

    Their limit for today is $0!
    Comments:
    Time until ph1102 can give away $0 to their commenters.
    0 Days 0 Hours 0 Minutes 0 Seconds
    Reply:

    To comment on this video please connect a HIVE account to your profile: Connect HIVE Account

    01:11
    23 views 3 years ago $
    02:22
    24 views 3 years ago $
    03:26
    12 views 3 years ago $

    More Videos

    01:28
    8 views a month ago $
    03:44
    5 views 2 years ago $
    01:14
    3 views a year ago $