Title: Conditionally Enqueue Scripts
Last modified: March 31, 2026

---

# Conditionally Enqueue Scripts

 *  Resolved [Stephen](https://wordpress.org/support/users/stephenk96/)
 * (@stephenk96)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/conditionally-enqueue-scripts/)
 * Hello, 
   I am trying to conditionally load the YMC scripts/styles so that they
   only load on pages where the filter and grids are being used.
 * I didn’t see a setting for this, but I did find the script handles. I noticed
   that the handles include numbers and letters at the end. Will these handles ever
   change?
 * Any guidance or clarification would be appreciated. Thank you!

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

 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/conditionally-enqueue-scripts/#post-18868241)
 * Hello!
   Installing the plugin includes the necessary scripts and styles for the
   plugin to function. These resources are included globally and are used on all
   pages of the site. The plugin does not allow individual resource inclusion on
   a specific page of the site.
    -  This reply was modified 1 month, 2 weeks ago by [YMC](https://wordpress.org/support/users/wssoffice21/).
 *  Thread Starter [Stephen](https://wordpress.org/support/users/stephenk96/)
 * (@stephenk96)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/conditionally-enqueue-scripts/#post-18868484)
 * I was wondering, if I try to conditionally load the scripts myself using “wp_dequeue_script(”);”,
   would the name of the handle ever change? Is that a good idea?
 *  Plugin Author [YMC](https://wordpress.org/support/users/wssoffice21/)
 * (@wssoffice21)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/conditionally-enqueue-scripts/#post-18868618)
 * You are free to use different implementation methods for including scripts. However,
   please note that if you attempt to modify the code within the plugin’s core, 
   subsequent updates will overwrite all your changes. Therefore, we do not recommend
   doing this.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditionally-enqueue-scripts%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/ymc-smart-filter/assets/icon-128x128.png?rev=3354891)
 * [YMC Filter](https://wordpress.org/plugins/ymc-smart-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ymc-smart-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ymc-smart-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/ymc-smart-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ymc-smart-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ymc-smart-filter/reviews/)

## Tags

 * [optimization](https://wordpress.org/support/topic-tag/optimization/)

 * 3 replies
 * 2 participants
 * Last reply from: [YMC](https://wordpress.org/support/users/wssoffice21/)
 * Last activity: [1 month, 2 weeks ago](https://wordpress.org/support/topic/conditionally-enqueue-scripts/#post-18868618)
 * Status: resolved