WordPress automatically adds rel=”noopener noreferrer” to links to prevent a known vulnerability. This does not affect SEO.
On some Avia Layout Builder elements you can switch to Text mode and edit the HTML to insert the ‘rel’ statement. But on others, such as Image, there appears to be no way to insert this code segment.
How can I add this when there is no Text option? I’ve tried turning on debug and adding it directly into the [av_image] shortcode but it doesn’t work.
Hey zimbo,
I am not sure that I understand.
Why you should add the noopener noreferrer at all?
If google does not care, then why?
Best regards,
Basilis
@Basilis – did you not read the link in the OP for the “known vulnerability”? That explains why WordPress has started adding the rel code by default to links containing target=”_blank” – it is as a precaution against reverse tabnabbing.
More here: https://mathiasbynens.github.io/rel-noopener/ and https://www.tinymce.com/docs/configure/content-filtering/#allow_unsafe_link_target
So the rel code is a security measure implemented by WordPress. If a user wants to disable the new setting, they can override it in functions.php but WP states “It is not recommended.” See here: https://wordpress.org/support/topic/remove-rel-noopener-noreferrer-in-wordpress-4-7-4/
How can I add this code to Image elements?
Hi,
You can create a jQuery script that targets the image element and apply a new rel attribute to them.
// http://api.jquery.com/attr/
Best regards,
Ismael