How To Remove Noreferrer in Wordpress
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
.:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. .:.
▶️ 3Speak
But the end of all things has drawn near. Therefore be sober-minded and be sober unto prayers.(1 Peter 4:7)
Question from the Bible, Is there such a thing as untimely death in the Bible?
Watch the Video below to know the Answer...
(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)
Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to Thank you, our beloved friend.
Check our Discord Chat
Join our Official Community: https://steemit.com/created/hive-182074
Nice video and tip for Wordpress users Zoltan, not planning to go back to that myself, but many others here are using it together with Steempress, stay awesome.
Yeah, Wordpress has it's pros and cons... A very often updates are sometimes pain in the a$$, and you have to do that regularly...
Thanks Zoltan, yeah that is why I let it go after getting hacked, I am pretty sure what plugin caused it, but all maintenence is a real pain, that is why Engrave is really great if you want your own domain on Steem, hopefully they will also be here after all this Tron stuff is solved one way or the other, and that they end up on the same chain as CTPtalk whatever that might be, stay awesome.