Skip to content

Instantly share code, notes, and snippets.

@schemapress
Last active August 12, 2018 03:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save schemapress/127a26aca8f70fd104fb161b4cafd9d9 to your computer and use it in GitHub Desktop.
Save schemapress/127a26aca8f70fd104fb161b4cafd9d9 to your computer and use it in GitHub Desktop.
Extend Schema.org Types options of the WordPress Schema plugin https://schema.press/docs/adding-support-new-schema-org-types/
<?php //* do not include php tag
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_7623456' );
/**
* Add New type to Schema Types options
*
* @since 1.0
*/
function schema_wp_new_add_schema_type_7623456( $options ) {
// Change 'NewType' to the actual schema.org type you want to add
// Example: Event, Product, JobPosting, ...etc.
$options['NewType'] = array (
'label' => __('NewType'),
'value' => 'NewType'
);
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment