Remove WordPress scripts

I am working on a custom page template in my theme and I want to remove all other styles and scripts which are loaded, like default theme style, jQuery & other scripts.

I want to remove all for the template page.

Read More

Please suggest.

Related posts

Leave a Reply

1 comment

  1. What Theme are you using? Your question is entirely Theme-dependent, so specific answers will requiring knowing what Theme you use. (Also, it would be helpful to know if any of your Plugins are injecting scripts.)

    The answer really depends on how those scripts and scripts are called.

    1. If they are called properly, they are registered and enqueued, which means that you simply need to deregister them.
    2. If they are hard-coded into the header, the easiest solution would probably be to create a custom header template file, called e.g. header-custom.php, which you can then call in your template file, via get_header( 'custom' ).