Created
June 28, 2016 08:31
-
-
Save joffff/bb01883283d9b0c226b8c7cbf487f537 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