How to stop “/ noopener noreferrer” get add to my Links in reusable buttons?

#84465
  • Resolved John Stanley
    Rank Math free

    Hello,
    I have recently setup buttons in block editor and they work initially when tested, but then somehow later this gets added to the Link “/ noopener noreferrer” and stops the button working. This is for all my buttons so stops my website from any conversions.

    Turns out I am not alone: https://github.com/WordPress/gutenberg/issues/14934
    AND https://tinygod.pt/gutenberg-adds-noopener-noreferrer-to-links/
    AND https://www.wpbeginner.com/beginners-guide/what-is-relnoopener-in-wordpress-explained/ (this talked about disabling Gutenberg block editor and using old classic editor then adding code into functions.php file OR a site specific plugin.
    AND more posts in WordPress.org
    It seems to be a WordPress issue (rather than RankMath)
    I have tried amending the reusable blocks to not open in a new tab and the problem persists. Please check the buttons in this post (in sensitive data)

    There are some coding solutions mentioned but I wanted to not have to play with code.
    Is there a better solution?
    Please help ASAP as my website is currently not converting for ANY of my 30 buttons and EVERY POST so this renders my entire website useless..
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math today.

    The noopener and noreferrer are usually added automatically added by WordPress to any linked element set to open in a new tab.

    Rank math does not have an option to control the noopener tag. If you don’t want to meddle with the code yourself, you can seek the help of a developer to add the suggested code to change this options.

    As for the links opening in new tab, you can disable external links from opening in new tab by disabling the option in Rank math > General Settings > Links
    img

    Looking forward to helping you. Thank you.

    Thank you,
    I have solved this.
    There were 2 issues here:
    1. I needed to add the link to the link icon, NOT the “Link Rel”. Silly my this is where the “noopener noreferrer” appears as these are “Link Rel” attributes. (GeneratePress support (my theme) guided me here and I now know what these are).

    2. The GeneratePress support provided Code Snippet then acts to nullify those “Link Rel” attributes, so the link in a button now opens correctly in a new tab.

    This is a weakness of mine not undestanding coding, HTML and not being interested in it. But I have now learned something.

    Hello,

    We are glad to hear this is resolved

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘How to stop “/ noopener noreferrer” get add to my Links in reusable buttons?’ is closed to new replies.