Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active November 15, 2018 03:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/8e78bcaea6fc97c75d61d07a39f5ca71 to your computer and use it in GitHub Desktop.
Save billerickson/8e78bcaea6fc97c75d61d07a39f5ca71 to your computer and use it in GitHub Desktop.
<?php
/**
* Event Schema
*
*/
function be_event_schema( $attr ) {
if ( 'event' == get_post_type() ) {
$attr['itemtype'] = 'http://schema.org/Event';
$attr['itemprop'] = '';
$attr['itemscope'] = 'itemscope';
}
return $attr;
}
add_filter( 'genesis_attr_entry', 'be_event_schema', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment