Title: Prevent plugin script loading til needed
Last modified: August 18, 2016

---

# Prevent plugin script loading til needed

 *  Resolved [slodaddy](https://wordpress.org/support/users/slodaddy/)
 * (@slodaddy)
 * [19 years ago](https://wordpress.org/support/topic/prevent-plugin-script-loading-til-needed/)
 * How can I prevent the plugin scripts loading on my home page?
    Many of the pages
   on my site don’t require plugins such as lightbox or cforms, but the script loads
   anyway causing a substantial hit.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [adamh](https://wordpress.org/support/users/adamh/)
 * (@adamh)
 * [19 years ago](https://wordpress.org/support/topic/prevent-plugin-script-loading-til-needed/#post-562810)
 * The only thing you could do is put a conditional statement at the top of your
   plugin(s) that checks, say, a page variable and only runs the script if it matches
 *  Thread Starter [slodaddy](https://wordpress.org/support/users/slodaddy/)
 * (@slodaddy)
 * [19 years ago](https://wordpress.org/support/topic/prevent-plugin-script-loading-til-needed/#post-562825)
 * Thanks. I’ll try that.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Prevent plugin script loading til needed’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [slodaddy](https://wordpress.org/support/users/slodaddy/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/prevent-plugin-script-loading-til-needed/#post-562825)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
