Created
November 12, 2014 17:07
-
-
Save palimadra/ff8fdb54de20d8ef314d to your computer and use it in GitHub Desktop.
A functions file for adding open graph tags to WordPress site
This file contains hidden or 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
// read more here: http://garage.socialisten.at/2013/06/new-open-graph-tags-for-article-publisher-author/ | |
// (c) @michaelkamleitner | |
if ( ! function_exists('additional_opengraph_tags') ) { | |
function additional_opengraph_tags() { | |
if ( is_single() and ! is_page()) { | |
?> | |
<meta property="article:publisher" content="https://www.facebook.com/YourPageName" /> | |
<meta property="article:author" content="https://www.facebook.com/YourAuthorName" /> | |
<? | |
} | |
} | |
add_action('wp_head', 'additional_opengraph_tags'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment