Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Jun 02, 2024 11:44 am
What is the reason that the wpdiscuz-combo-js is >not< registered with 'strategy' => 'defer' (or at least configureable) ?
I had some problems with "ReferenceError: jQuery is not defined at wpdiscuz-combo.min.js?ver=7.6.19:8:1", which are solveable with using defer.
1 Reply
Jun 04, 2024 10:00 am
Hi,
You can use the hook code below. It allows you to add the attributes you want to any js code:Â
add_filter('script_loader_src', 'custom_script_loader_src', 10, 2); function custom_script_loader_src($src, $handle) { if ($handle !== 'wpdiscuz-combo-js') { return $src; } return $src . "' defer"; }