1. Home
  2. Knowledge Base
  3. SEO Suite
  4. Remove “rank-math-link” Class from All Outbound Links

Remove “rank-math-link” Class from All Outbound Links

In this tutorial, we’re going to walk through the steps on how to remove the Rank Math link class from the outbound links.

In the Rank Math plugin, we overwrite Gutenberg’s link module to add nofollow & sponsored attributes. The rank-math-link is a unique class that is needed to overwrite the default module.

However, you can paste the following code in your theme’s functions.php file to remove the rank-math-link class.

 * Filter to remove `rank-math-link` class from the frontend content links
add_filter( 'rank_math/link/remove_class', '__return_true' );

Doing this will essentially render the nofollow and sponsored options for outbound links to be useless:

nofollow and sponsored option

We offer other options for links at WordPress Dashboard > Rank Math > General Settings > Links as well. You can read more about each setting in our General Settings guide. If you still have any questions, please feel free to contact our support team who are available 24×7 and will help you out as soon as possible.

Was this article helpful?

Still need help?


Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles