---
title: Filter automatic event schema
url: "https://www.seopress.org/support/hooks/filter-automatic-event-schema/"
lang: en-US
updated: 2021-09-29
hook_name: seopress_schemas_auto_event_json, seopress_schemas_auto_event_html
required_version: 4.7, 3.5
---

# Filter automatic event schema

- **Hook name:** `seopress_schemas_auto_event_json, seopress_schemas_auto_event_html`
- **Required version:** 4.7, 3.5

```php
add_filter('seopress_schemas_auto_event_json', 'sp_schemas_auto_event_json');
function sp_schemas_auto_event_json($json) {
	//returns schema as an array with 'property' => 'value'
	return $json;
}

function sp_schemas_auto_event_html($jsonld) {
	$jsonld = '<script type="application/ld+json">Full documentation here: https://schema.org/Event</script>';
	return $jsonld;
}
add_filter('seopress_schemas_auto_event_html','sp_schemas_auto_event_html');
```

Source: [https://gist.github.com/wp-seopress/1fa92ab933f412b1c807a708e76daa4e](https://gist.github.com/wp-seopress/1fa92ab933f412b1c807a708e76daa4e)



