Okay, so I'm well familiar with the way to properly enqueue a stylesheet or JavaScript in the WordPress header via the functions.php file.
Recently though I came across a situation that has me puzzled. I want to setup this script on my WordPress site: customize-twitter-1.1.
First I need to embed the Twitter JavaScript in my footer which is this code here:
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id)){js=d.createElement(s);js.id=id;
js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}
}(document,"script","twitter-wjs");
</script>
Then I need to embed this JavaScript in the footer as well:
<script src="customize-twitter-1.1.min.js" type="text/javascript"></script>
Last but not least, I need to embed this code as well...
<script>
var options = {
"url": "/my-styles.css"
};
CustomizeTwitterWidget(options);
</script>
So far the code I've added to my functions.php file looks like this...
wp_register_script( 'twitter-customize', get_template_directory_uri() . '/js/customize-twitter-1.1.min.js', array(), '1.0', true );
wp_enqueue_script( 'twitter-customize' );
That code correctly enqueues one of the JavaScript files, I'm just unsure how I go about adding the others and on top of that adding them to the footer as well.
Any input is appreciated, thanks guys!