Title: wp_dequeue_script?
Last modified: August 21, 2016

---

# wp_dequeue_script?

 *  [johnmontfx](https://wordpress.org/support/users/johnmontfx/)
 * (@johnmontfx)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wp_dequeue_script/)
 * This is really one of the best implementations of functionality….thanks for the
   share.
 * For my custom theme, I would like to check for the plugin and disable/enable 
   it for specific conditions. In looking through the code, I can hack it for sure—
   but am curious if you have built in a specific way of doing this?
 * I figure I could change the settings on the fly somehow to be “disabled”, but
   not sure if this would be a good way of doing things.
 * Any suggestions?
 * Thanks
 * [https://wordpress.org/plugins/scroll-back-to-top/](https://wordpress.org/plugins/scroll-back-to-top/)

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

 *  Plugin Author [joesexton00](https://wordpress.org/support/users/joesexton00/)
 * (@joesexton00)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wp_dequeue_script/#post-5076400)
 * I haven’t implemented a way to selectively enable/disable the button per page,
   but in the next release I can add a filter for the enabled/disabled status to
   allow the theme to disable when needed.
 * One way to pull this off would be to simply add a CSS property “display: none!
   important” for the .scroll-back-to-top-wrapper.show selector. While not ideal,
   this would work without hacking the plugin.
 *  Thread Starter [johnmontfx](https://wordpress.org/support/users/johnmontfx/)
 * (@johnmontfx)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wp_dequeue_script/#post-5076487)
 * Thanks man — for the suggestion. Should have thought of that. That’s probably
   quite a bit easier than de_queing all the files…and then having to change the
   code when I update.
 * A filter would be AWESOME…
 * The plugin is really nice…coding is clear as well 🙂
 *  Plugin Author [joesexton00](https://wordpress.org/support/users/joesexton00/)
 * (@joesexton00)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wp_dequeue_script/#post-5076505)
 * On second thought, there is a filter available, “sbtt_button_markup” which is
   the filter for the HTML markup of the button, you could add a filter and return“”
   to essentially remove the button. Doing that will not remove the styles or javascript,
   but the button won’t show.

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

The topic ‘wp_dequeue_script?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/scroll-back-to-top_fefefe.svg)
 * [Scroll Back To Top](https://wordpress.org/plugins/scroll-back-to-top/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/scroll-back-to-top/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/scroll-back-to-top/)
 * [Active Topics](https://wordpress.org/support/plugin/scroll-back-to-top/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scroll-back-to-top/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scroll-back-to-top/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [joesexton00](https://wordpress.org/support/users/joesexton00/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/wp_dequeue_script/#post-5076505)
 * Status: not resolved