Support » Themes and Templates » Deactivate plugins in my theme

Deactivate plugins in my theme

  • I’d like to ask if it’s possible to deactivate plugins based on the theme that I’m using.

    I’ve got a plugin a(wpSeo) ctivated sitewide and the plugin doesn’t work well with one of the themes I’d like to use in some of my blogs. So I’d like to put some code in my theme to tell the aforementioned plugin to just stop messing with this particular theme.

    Is there any possibility of doing so?

Viewing 2 replies - 1 through 2 (of 2 total)
  • i dont know if it possible. but i have suggestion:

    check name of some function in plugin files and add this to your theme:

    add_action('admin_notices', 'myfnc');
    function myfnc() {
    if (function_exists('name of function from plugin')) {
     return "Please deactivate wpSeo plugin. It doesnt work with this theme.";

    This will show yellow bar with message at top of admin dashboard

    sorry, not return, but echo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Deactivate plugins in my theme’ is closed to new replies.