Scripts working on post preview – do not work once post published.
-
Published post : https://www.criticalclarity.com/2016/07/02/second-try-at-this/
Post as it appears from my preview tab with javascript working (saved preview source as a new web-page) : https://www.criticalclarity.com/dnd_post.html
I have some javascript in the header, a call to the drawVisualization(); javascript function in the body, and a link to a vis.js external script.
None of the javascript appears in my post.
I linked to the vis.js external script by adding a wp_register_script pointing to it in my header.php and by editing the scripts-n-styles plugin to add ‘vis-js’ to list supported for wp_enqueue_script. I then added vis-js on my post using the scripts-n-styles include functionality.
Any advice Ken Newman? ??
Cheers,
Charles.
- The topic ‘Scripts working on post preview – do not work once post published.’ is closed to new replies.