Created
March 22, 2017 05:28
-
-
Save MrJSdev/6075d3510e0f14eaf9ceefd0db3698ef to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Add Facebook SDK | |
* | |
*/ | |
function be_facebook_sdk() { | |
?> | |
<div id="fb-root"></div> | |
<script>(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=123456789123456"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk'));</script> | |
<?php | |
} | |
add_action( 'genesis_before', 'be_facebook_sdk' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment