Skip to content

Instantly share code, notes, and snippets.

@fovoc
Created April 1, 2014 16:34
Show Gist options
  • Save fovoc/9917819 to your computer and use it in GitHub Desktop.
Save fovoc/9917819 to your computer and use it in GitHub Desktop.
Disable Shoestrap 3 Gridder from homepage (this file should be placed in wp-content/mu-plugins/ folder, the homepage should be set manually)
<?php
add_filter( 'option_active_plugins', 'disable_gridder_in_homepage' );
function disable_gridder_in_homepage($plugins){
$homepage = 'local.wordpress.dev/';
if( ( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) == $homepage ) {
$key = array_search( 'shoestrap-gridder/shoestrap-gridder.php' , $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