WordPress.org

Ready to get started?Download WordPress

Forums

Deactivate plugins in my theme (3 posts)

  1. arnalyse
    Member
    Posted 3 years ago #

    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?

  2. kkarpieszuk
    Member
    Posted 3 years ago #

    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

  3. kkarpieszuk
    Member
    Posted 3 years ago #

    sorry, not return, but echo

Topic Closed

This topic has been closed to new replies.

About this Topic