Closed syedc closed 5 years ago
On WP 5.1, with Disqus 3.0.17, the plugin seems to cause jQuery conflict with custom JS functions.
To Replicate, on a WP Homepage Template, if you have something like the following, it will throw a function not found error for your custom function:
<script> jQuery(window).load(function() { load_my_stuff(); }); function load_my_stuff () { console.log('d'); } </script>
It seems to come down to a conflict with jester.js, which is loaded on the page with count.js.
A quick fix is to remove count.js...provided you don't need it, by placing the following in your funcitons.php or functions plugin.
function filter_dsq_can_load( $script_name ) { // $script_name is either 'count' or 'embed'. if ( 'count' === $script_name ) { return false; } return true; } add_filter( 'dsq_can_load', 'filter_dsq_can_load' );
Thank you for help @syedc
We have rolled back the change that was causing this issue on the server side yesterday. Please let us know if you are still seeing issues.
On WP 5.1, with Disqus 3.0.17, the plugin seems to cause jQuery conflict with custom JS functions.
To Replicate, on a WP Homepage Template, if you have something like the following, it will throw a function not found error for your custom function:
It seems to come down to a conflict with jester.js, which is loaded on the page with count.js.
A quick fix is to remove count.js...provided you don't need it, by placing the following in your funcitons.php or functions plugin.