• Resolved datht123

    (@datht123)


    How to remove attribute rel = “nofollow” in all page ?

    I try this but not working

    add_filter(‘the_content’, ‘your_custom_function’,10 ,1);
    function your_custom_function($link) {
    return str_replace(‘ rel=”nofollow”‘, ”, $link);
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Tellyworth

    (@tellyworth)

    Which particular nofollow links are you trying to change? Not all of them are within page content, which is one reason why this might not be working for you.

    Thread Starter datht123

    (@datht123)

    @tellyworth I want remove nofollow in author link, read more link and pagination link

    Thread Starter datht123

    (@datht123)

    @tellyworth i use jQuery but it not remove in view page source

    jQuery(“a[rel~=’nofollow’]”).each(function(){

    jQuery(this).removeAttr(‘rel’);

    });

    Moderator Tellyworth

    (@tellyworth)

    Author links, read more links, and pagination links don’t have the nofollow attribute in WordPress core (internal links generally don’t). What you’re seeing might be specific to a theme or plugin you’re using. Are you able to show some specific examples, either as a link to a web site or a copy-paste or screenshot of the html page source?

    jQuery won’t work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove rel=”nofollow” in all page’ is closed to new replies.