Last active
May 8, 2019 16:13
-
-
Save anythinggraphic/0b707f468385431c839aac2af63131fd to your computer and use it in GitHub Desktop.
Change microdata for Article with the class 'entry' in Genesis child themes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @link https://anythinggraphic.net/change-class-id-itemtype-and-other-attributes-in-genesis/ | |
/* Change microdata for Article with the class 'entry' in Genesis child themes | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'genesis_attr_entry', 'ag_article_attributes', 20 ); | |
function ag_article_attributes( $attributes ) { | |
if( is_singular( 'leadership' ) ) { | |
// class, id, itemscope, itemtype, etc. | |
$attributes['itemtype'] = 'http://schema.org/Organization'; | |
} | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment