Skip to content

Instantly share code, notes, and snippets.

@web-dev-media
Last active August 29, 2015 14:06
Show Gist options
  • Save web-dev-media/29bb5ac8ed8fb3731ecb to your computer and use it in GitHub Desktop.
Save web-dev-media/29bb5ac8ed8fb3731ecb to your computer and use it in GitHub Desktop.
Add Nofollow to the Author description
<?php
/**
* Plugin Name: Add Nofollow to the Author description
* Plugin URI: https://gist.github.com/web-dev-media/29bb5ac8ed8fb3731ecb
* Description: Add rel="nofollow" to the author description
* Version: 1.0
* Author: ../web/dev/media <[email protected]>
* Author URI: http://www.web-dev-media.de
* License: GPL2
*/
/**
* Add rel nofollow to links at the author box
*
* @author ../web/dev/media
*/
function add_nofollow_author_box( $author_meta ) {
echo str_replace( '<a href=', '<a rel="nofollow" href=', $author_meta );
}
add_filter( 'the_author_description', 'add_nofollow_author_box' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment