Make blogroll links no-follow?

How can I add a nofollow option to my blogroll links editor?

Attempted to just type “nofollow” into the “rel” input box, but its auto deleted onblur.

Read More

If I turn javascript off (thanks to Matt’s suggestion below), It works, but when I check the source on my site, the rel attribute looks like this…

rel=”nofollow”onclick=”javascript:pageTracker._trackPageview(‘/outbound/blogroll/www.site.com’);

Related posts

Leave a Reply

2 comments

  1. You can filter your blogroll to make all links nofollow with a function like this:

    function nofollow_blogroll( $html ) {
        // remove existing rel attributes
        $html = preg_replace( '/s?rel=".*"/', '', $html );
        // add rel="nofollow" to all links
        $html = str_replace( '<a ', '<a rel="nofollow" ', $html );
        return $html;
    }
    add_filter( 'wp_list_bookmarks', 'nofollow_blogroll' );
    

    If you need to do it on a case-by-case basis, though, you’re probably stuck with some hacks like @matt pointed out.