-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
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' );
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels