Skip to content

Instantly share code, notes, and snippets.

@joffff
Created June 28, 2016 08:31
Show Gist options
  • Save joffff/bb01883283d9b0c226b8c7cbf487f537 to your computer and use it in GitHub Desktop.
Save joffff/bb01883283d9b0c226b8c7cbf487f537 to your computer and use it in GitHub Desktop.
Disable WordPress plugin on specific page
<?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