Is it possible to stop selected plugins from loading on certain template pages?

I have a template page that has form on that is only used once in my site. The form uses form validation using jquery validate plugin (such a great plugin). Once the cart66 Plugin is loaded, the form validation stops working.

Rather spending ages looking for the conflict, I thought it would be easiest to just turn off the plugin for that template page as cart66 is not need on this page.

Read More

Is it possible to stop plugins loading on individual template pages? I am using WordPress 3.2.1

Related posts

Leave a Reply

3 comments

  1. It sounds like the javascript from cart66 and your form plugin are in conflict. You can ‘turn off’ javascript per page/ post etc. by using the enqueue script function.

    Hopefully both of your plugins are written well and include their javascript with this method.

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    If so, they will have a handle that you can use to deregister (or dequeue) the script.

    http://codex.wordpress.org/Function_Reference/wp_deregister_script

    You’ll need to write a conditional script

    <?php if(!is_page('FORM-PAGE-SLUG')){wp_dequeue('form-javascript-handle')}?>
    

    that should be a good starting place.