• 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 5 years, 2 months ago by joy0114.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Sterup

    (@foomagoo)

    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

    (@joy0114)

    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

    (@foomagoo)

    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

    (@joy0114)

    Yes, that’s sadly true …
    Too bad !

    Thread Starter joy0114

    (@joy0114)

    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.