Created
October 12, 2011 20:04
-
-
Save jeherve/1282359 to your computer and use it in GitHub Desktop.
Add new og:image when using the custom field images plugin
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
function werewp_ogimage() { | |
$customimage = get_custom_field_image(); | |
echo '<meta property="og:image" content="'.$customimage.'" />'; | |
} | |
add_action( 'wp_head', 'werewp_ogimage' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment