Created
July 26, 2012 14:04
-
-
Save rolandinsh/3182211 to your computer and use it in GitHub Desktop.
itemprop wp
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 | |
/* | |
info: http://simplemediacode.info/snippets/itemprop-attributes-for-wordpress-serp-results/ | |
as WordPress plugin http://wordpress.org/extend/plugins/itempropwp/ | |
*/ | |
add_filter('post_thumbnail_html','mediaboxlv_image_itemprop',10,3 ); | |
function mediaboxlv_image_itemprop($html, $post_id, $post_image_id){ | |
$html = str_replace('src',' itemprop="image" src',$html); | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment