Skip to content

Instantly share code, notes, and snippets.

@schemapress
Last active December 22, 2018 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schemapress/feec1fa37a823dbed677a10f2271da54 to your computer and use it in GitHub Desktop.
Save schemapress/feec1fa37a823dbed677a10f2271da54 to your computer and use it in GitHub Desktop.
Modify The Author Schema Markup https://schema.press/docs/modify-author-markup/
<?php //* do not include php tag
add_filter( 'schema_wp_author', 'schema_author_output_modify_8198771356' );
/**
* Modify The Author Schema Markup in Schema Plugin
*
* @param array $author
* @return array
*/
function schema_author_output_modify_8198771356( $author ) {
// Modify author name
$author['name'] = 'Another Name';
// Modify description
$author['description'] = 'Some other description';
// Remove Author URL from the markup
unset($author['url']);
// Return the array
return $author;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment