Skip to content

Instantly share code, notes, and snippets.

@schemapress
Last active January 24, 2019 20:47
Show Gist options
  • Save schemapress/00bb6489ff1011fd42e3334f4dad2cb0 to your computer and use it in GitHub Desktop.
Save schemapress/00bb6489ff1011fd42e3334f4dad2cb0 to your computer and use it in GitHub Desktop.
Remove Author URL from schema.org markup https://schema.press/docs/modify-author-markup/
<?php //* do not include php tag
add_filter('schema_wp_author', 'remove_author_url_markup_588877256');
/**
* Schema Plugin: Remove Author URL since it has the username id exposed.
*
* @since 1.0
*/
function remove_author_url_markup_588877256( $author ) {
if ( isset($author['url']) ) {
// Unset the Author URL
unset( $author["url"] );
}
return $author;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment