Last active
August 29, 2015 14:13
-
-
Save callingmedic911/22fa7f8071f69232d640 to your computer and use it in GitHub Desktop.
Add following snippet to functions.php file to add OG Image tag specifically to home.
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 | |
medic_home_og() { | |
if ( is_front_page() || is_home() ) | |
echo '<meta property="og:image" content="http://link/to/your/og/image/file" />'; | |
} | |
add_action( 'wp_head', 'medic_home_og', 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment