Hi,
I want to Deregister below scripts for single post. Please let me know how can I achieve this.
Scripts:
https://simplytamil.com/wp-content/plugins/td-composer/legacy/Newspaper/js/tdAjaxSearch.js
https://simplytamil.com/wp-content/plugins/td-composer/legacy/Newspaper/js/tdLoginMobile.js
https://simplytamil.com/wp-content/plugins/td-composer/legacy/Newspaper/js/tdLoadingBox.js?
https://simplytamil.com/wp-content/plugins/td-composer/legacy/Newspaper/js/tdSmartSidebar.js
https://simplytamil.com/wp-content/plugins/td-composer/legacy/Newspaper/js/tdInfiniteLoader.js
Note: I tried the below code. But it is not working.
wp_deregister_script(‘tdAjaxSearch’);
Hello @Satheeshraj !
In the latest update of the theme, we cleaned everything, and the scripts are not appearing anymore if you don’t use them. You can disable the features in Composer.
Thank you!
Hi,
I’m using latest version only. I need to deregister those script since it contains lot of unwanted code. Will create a separate script file with required code alone.
Regards,
Satheeshraj V
Hello @satheeshraj !
Simply disable the features in the tagdiv composer. For customization and other services, you can contact our custom work team here: https://tagdiv.com/premium-customization-services/.
Thank you!
Hi,
I think you are not getting my point. I don’t want any customization from theme side. Point here is every wordpress theme, plugin can load any script/styles. But there is an option to dequeue the script using wp_dequeue_script method if we dont want the script.
To dequeue the script we want the proper id. Here is the example to dequeue woocommerce script. Here the id used is “woocommerce”.
wp_dequeue_script( ‘woocommerce’ );
Like this I want to dequeue the above mentionioned scripts from theme. For this I want to know the proper id. Hope you got it.
Regards,
Satheeshraj V
Hello @satheeshraj !
Ok. You can find those IDs if you inspect the website and search after the name of the js. For example: https://prnt.sc/C9zP2Ms7-4xV
Thank you!
Hi,
I have already tried that but it’s not working for the newspapaer theme scripts alone. I have dequed all other scripts in the same manner.
Regards,
Satheeshraj V
Hello @satheeshraj !
You can contact our custom work team here: https://tagdiv.com/premium-customization-services/ and they will find a solution for you.
Thank you!
Thus is not a custom work, this is a wordpress feature. Why I need to pay for this? Every theme and plugin will have this feature.
I also really want to get rid of tdloadingbox.js and tdinfiniteloader.js, its only a source for problems regarding caching plugins etc. especially tdloadingbox.js. I really cant find a way to deactivate the tdloadingbox.js like, this should be a checkbox in the composer for the header template.
Hello!
Normally, if you disable the features in the theme that you are using, they shouldn’t appear there. Custom codes require custom work; this is what I mean. We will recheck everything and fix it if it appears, even if you are not using it on your website.
Disable the following features:
-> https://forum.tagdiv.com/infinite-loading-single-posts/
-> next, prev, load more features from blocks options.
-> https://forum.tagdiv.com/mega-menu/
-> Woo Attribute Filters element
Thank you!
Infinite loading is not active also mega Menu is not active. I checked everything. You can see for yourself: 4kfilme.de.
The tdloadingbox.js is in my understanding only there for slowly fading the menue in. And because the .js is using jquery.js, if i want to defer jquery.js (via caching plugin) for performance purposes, the menu doesn’t show at all. It’s just an animation. Correct me if i’m wrong.
I could raise my pagespeed about 8 points only for defering jquery.js, but i cant, because then the menu on desktop wont show… this is just an necessary feature.
I saw this in the latest changelog:
fix: tdLoadingBox.js script was loading when it wasn’t supposed to;
Now the tdloadingbox.js wont load, but the fade-in animation of the menue in desktop is still there and is operated via jquery.js (correct me if im wrong). I dont know who needs to have this menue animation on every page load. This is just unnecessary in my opinion. Cant you make this fade in animation optional so that i can deactivate it in the tagdiv composer? Because i still cant defer the jquery.js, because then the menue wont show in desktop.