Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

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

share|improve this question
add comment

3 Answers

Use Plugin Organizer. http://wordpress.org/extend/plugins/plugin-organizer/. It cant disable plugins by template but it can disable them by post, page, custom post_type, or arbitrary URL.

share|improve this answer
add comment

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.

share|improve this answer
    
Thanks already thought of searching for all the scripts that Cart66 includes and using enqueue to stop them. Would be nice if there was a way to just turn on the plugin all together. –  lomokev Aug 2 '11 at 18:02
    
That may not be possible, especially with an e-commerce plugin - there may be session data or other variables that need to be carried by functions throughout the entire site visit that you would lose by dropping functions. If anything, the best solution is to find out what is conflicting with form javascript. What errors are you getting in Firebug when you try to use the form? –  Aris Blevins Aug 2 '11 at 19:50
add comment

Yes, you can disable specific plugins or scripts form appearing on certain pages.

Check this example how I disabled the easy fancybox plugin from appearing

Hope it helps :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.