AddThis is a premium provider of social sharing buttons which can be installed manually or using the AddThis plugin for WordPress.
In this post, i’ll show you how to load the addthis script from an external URL source.
I’ll also show you how to display the buttons in any WordPress or Genesis hook position conditionally using a simple custom function.
Note: Any code you use from this post should be copied from the view raw link in the Gist and pasted at the end of your child themes functions file.
Load AddThis Script From External URL
Generally when loading scripts in WordPress, you would use the wp_enqueue_script function. AddThis won’t load if you use this function alone so you will need to use the init hook in its place or with it.
You need to pay to fully access this tutorial.
Enjoy unlimited access & coding support by registering.