Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 <info@web-dev-media.de>
* 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
You can’t perform that action at this time.