Created
November 1, 2014 14:46
-
-
Save joeyblake/2f7264d3070d51732fa8 to your computer and use it in GitHub Desktop.
SharePress replace open graph meta data filter
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
//Add this to your theme's functions.php file | |
//Modify the function to add the custom field value you are looking for | |
add_filter('sharepress_og_tags', 'my_sharepress_og_tags'); | |
function my_sharepress_og_tags( $og ) { | |
global $post; | |
$stripped_quotes = str_replace( '"', '', $og['og:title'] ); | |
$og = array_merge($og, array( | |
'og:title' => $strip_quotes | |
)); | |
return $og; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment