Title: JavaScript not being inserted into page
Last modified: August 31, 2016

---

# JavaScript not being inserted into page

 *  Resolved [Daniel](https://wordpress.org/support/users/drstout/)
 * (@drstout)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/)
 * I’ve added the sharing widget to posts. The HTML tags for the sharing buttons
   are being inserted. The CSS file is showing up in the wp_footer(). But the JavaScript
   is nowhere to be found, so the sharing widget is not showing.
 * I’ve tried turning asynchronous loading off, but no change. The plugin is working
   on another site I use, but on this site the AddThis JavaScript is not being inserted
   into the page.
 * Here’s a sample post where the buttons are not showing:
    [https://danielstout.com/2016/01/play-for-today/](https://danielstout.com/2016/01/play-for-today/)
 * Can this be fixed?
 * [https://wordpress.org/plugins/addthis/](https://wordpress.org/plugins/addthis/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [Daniel](https://wordpress.org/support/users/drstout/)
 * (@drstout)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056616)
 * I got this working on another site that’s configured nearly identical to the 
   site that’s not working. The only meaningful difference is that the site that
   AddThis is not working on is an HTTPS only site. It is only available through
   a secure session. The other sites I’ve tested primarily use HTTP. Not sure if
   that’s the issue, but so far that’s the only difference I’ve noticed.
 *  [delythchandler](https://wordpress.org/support/users/delythchandler/)
 * (@delythchandler)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056802)
 * I’m having the same problem.
 * I’ve got it working on my local development site, but it just won’t call in the
   javascript into the staging or live sites, which are identical, except that they
   are hosted on a digitalocean droplet instead of locally.
 * I’d be really grateful if anyone has a suggestion of what may be the problem 
   here.
 *  Plugin Contributor [Julka Grodel](https://wordpress.org/support/users/jgrodel/)
 * (@jgrodel)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056803)
 * Hi Dr. Stout.
 * I’m seeing the AddThis script inserted on the URL you mention, and the sharing
   sidebar is appearing on that page as well. Are you still having this issue on
   other pages?
 * And Hello Delythchandler!
 * Do you have a URL I could look at that isn’t doing what you expect with AddThis?
 * Thanks,
    Julka
 *  Thread Starter [Daniel](https://wordpress.org/support/users/drstout/)
 * (@drstout)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056804)
 * Hi, Julka — It was a curious problem with a curious solution. The AddThis JavaScript
   wasn’t being inserted into any pages. I finally fixed it by selecting a different
   theme, and then immediately switching back to the original theme. After that,
   the JavaScript appeared correctly.
 *  [TwoThirdsWater](https://wordpress.org/support/users/twothirdswater/)
 * (@twothirdswater)
 * [10 years ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056805)
 * I’m having an almost identical issue to Dr Stout. The addthis plugin works fine
   on my test platform, but not on live.
 * Looking at the page source, the addthis css file is being added to the footer,
   but not the preceding Javascript blocks that I can see on my dev platform.
 * There are no JS errors being reported.
 * I’m very nervous about attempting Dr Stouts solution however, as the live site
   is very high traffic and any theme fiddling will cause problems.
 * Julka do you have any idea what might be stopping the addthis JS from being written
   to the page please?
 * Thanks!
 *  Plugin Contributor [Julka Grodel](https://wordpress.org/support/users/jgrodel/)
 * (@jgrodel)
 * [10 years ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056806)
 * Hi TwoThirdsWater.
 * Do you have a caching plugins installed? My guess would be that Dr. Stout’s solution
   worked because it triggered a caching plugin to clear its cache. You should be
   able to do that manually from the settings of the caching plugin.
 * This is my only guess as to why switching themes worked for him.
 * Thanks,
    Julka
 *  [TwoThirdsWater](https://wordpress.org/support/users/twothirdswater/)
 * (@twothirdswater)
 * [10 years ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056807)
 * Hi Julka
 * Many thanks for the pointer.
 * Clearing the cache (and running all available updates) has gone some way to fixing
   the problem. The share icons are now appearing on the post pages, but not on 
   the homepage or category pages.
 * The sidebar is configured to appear on the homepage (and all other templates).
 * Do you have any other suggestions please?
 * Thanks again for your help…

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘JavaScript not being inserted into page’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/addthis_70cced.svg)
 * [WordPress Share Buttons Plugin – AddThis](https://wordpress.org/plugins/addthis/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/addthis/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/addthis/)
 * [Active Topics](https://wordpress.org/support/plugin/addthis/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/addthis/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/addthis/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [TwoThirdsWater](https://wordpress.org/support/users/twothirdswater/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/javascript-not-being-inserted-into-page/#post-7056807)
 * Status: resolved