Title: Disabling plugin on 404.php
Last modified: January 1, 2020

---

# Disabling plugin on 404.php

 *  [joy0114](https://wordpress.org/support/users/joy0114/)
 * (@joy0114)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/)
 * Hello,
 * First, a big “well done” to team dev of this plugin, so useful.
 * One question: does somebody known if it’s possible to use it for disabling a 
   plugin when wordpress calls the 404.php page ?
 * Obviously I don’t have a formal 404 page, just a file 404.php. So, no permalink
   to specify for disabling a plugin.
 * Thanks a lot in advance for any idea !
    Best regards
    -  This topic was modified 6 years, 5 months ago by [joy0114](https://wordpress.org/support/users/joy0114/).

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

 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/#post-12304956)
 * I’m not sure how you would disable plugins on the 404 page since the URL of the
   page being viewed is whatever the visitor was trying to get to. And since plugins
   are disabled before the wordpress core is loaded I can’t use the is_404 function
   to do it.
 *  Thread Starter [joy0114](https://wordpress.org/support/users/joy0114/)
 * (@joy0114)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/#post-12305395)
 * Hello Jeff,
 * Thanks for your answer.
    Yes, indeed, “the URL of the page being viewed is whatever
   the visitor was trying to get to”… and this is the problem: I can’t specify, 
   into “plugin filter”, for disabling a plugin. Plugin is “sliding widget”. I don’t
   want to see it on the “not found page”. If Plugin Filter can’t prevent loading
   a plugin in this case, perhaps I’m going to see if I can do it with a function:
   if a page use 404.php, so deregister plugin X … well that’s the idea …. perhaps
   bad …
 * Best regards an thanks for having answered.
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/#post-12305968)
 * You could disable it globally and then just enable it where it is needed. but
   that may not work for you either since it is probably needed in a lot of places.
 *  Thread Starter [joy0114](https://wordpress.org/support/users/joy0114/)
 * (@joy0114)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/#post-12306306)
 * Yes, that’s sadly true …
    Too bad !
 *  Thread Starter [joy0114](https://wordpress.org/support/users/joy0114/)
 * (@joy0114)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/#post-12306367)
 * So, I found a workaround.
    Into the specific header created for my 404.php page,
   I included a simple:
 *     ```
       <style type="text/css">#wpbs_slider{display:none;}</style>
       ```
   
 * Quite dirty, but better than nothing !

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

The topic ‘Disabling plugin on 404.php’ is closed to new replies.

 * ![](https://ps.w.org/plugin-organizer/assets/icon-256x256.png?rev=1786554)
 * [Plugin Organizer](https://wordpress.org/plugins/plugin-organizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plugin-organizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plugin-organizer/)
 * [Active Topics](https://wordpress.org/support/plugin/plugin-organizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plugin-organizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plugin-organizer/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [joy0114](https://wordpress.org/support/users/joy0114/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-on-404-php/#post-12306367)
 * Status: not resolved