Site logo

Archived topic

Lightweight social icon“Add rel=”noopener” or rel=”noreferrer”

9 replies · Started by Lilia on July 29, 2019

Viewing posts 1–10 of 10

Hey there, at first, i love your theme and social icons and have one litte question. Is it possible to implement the recommendation of Google Lighthouse that says: “Add rel=”noopener” or rel=”noreferrer” to each of the links that Lighthouse has identified in my page https://www.eu-rights.com report.”?

thx
lili

I have the same problem, installed the code snippets and added the PHP code above, but it dosent seems to work. Or do i need to do something more than activate the snippet in the code snippets plugin?

thank you

Hi there,

that code should work in code snippets nothing extra to be done.
If you have a link to the site we can take a look

Can you try this and let me know if it works:

add_filter( 'lsi_icon_rel_attribute', function() {
    return 'noreferrer';
} );

That worked, thank you.

Glad to be of help

needed to change little bit to Lighthouse to accept it.

add_filter( 'lsi_icon_rel_attribute', function() {
    return 'rel=noreferrer';
} );

Thanks for sharing

This archived topic is closed to new replies.