-
-
Save gorobey/202963ae15616b1c8ba09b5576b3e66b to your computer and use it in GitHub Desktop.
Disable WordPress plugin on specific page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'option_active_plugins', 'disable_plugins' ); | |
function disable_plugins($plugins){ | |
$key = array_search( 'wordpress-seo/wp-seo.php' , $plugins ); //Plugin path within /wp-content/plugins/ | |
if ( false !== $key ) unset( $plugins[$key] ); | |
return $plugins; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment