title: Disable specific plugin on Wordpress frontpage/homepage only
body: <p>Im trying to disable a plugin on a Wordpress frontpage, to make it a bit lighter. I only want it disabled when the front page is displayed.</p>
  
  <p>I got this working code where I put in wp-content/mu-plugins/
  It disables one plugin on all pages except a specified /subpage/
  This is great, but it's not exactly what I am after.</p>
  
  <p>How can I change this code to disable a plugin only when viewing the front page ?</p>
  
  <p>Here is the code : </p>
  
  <pre><code>add_filter( 'option_active_plugins', 'lg_disable_plugin' );
  function lg_disable_plugin($plugins){
  
      if(strpos($_SERVER['REQUEST_URI'], '/subpage/') === FALSE AND strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === FALSE) {
  
          $key = array_search( 'was-this-helpful-pro/was-this-helpful-pro.php' , $plugins );
  
          if ( false !== $key ) {
              unset( $plugins[$key] );
          }
      }
  
      return $plugins;
  }
  </code></pre>
  
  <p>I also found another code which works for other pages....
  But its the same story , I cannot figure out how to make it work for the frontpage, only works on subpages**</p>
  
  <pre><code>$listener_term = '/subpage/';
  $current_url   = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '';
  
  // listener for the thin load
  if ( strstr( $current_url, $listener_term ) ) {
   add_filter( 'option_active_plugins', 'api_request_disable_plugin' );
  }
  function api_request_disable_plugin( $plugins ) {
   $plugins_not_needed = array(
   'backupwordpress/backupwordpress.php',
   'wordfence/wordfence.php',
   'contact-form-7-to-database-extension/contact-form-7-db.php',
   'contact-form-7/wp-contact-form-7.php',
   'wp-piwik/wp-piwik.php',
   'simple-responsive-slider/simple-responsive-slider.php',
   'google-sitemap-plugin/google-sitemap-plugin.php',
   'category-page-icons/menu-compouser.php',
   'easy-fancybox/easy-fancybox.php',
   'business-owner-switch/business-owner-switch.php',
   'wordpress-seo/wp-seo.php'
   );
  
   foreach ( $plugins_not_needed as $plugin ) {
   $key = array_search( $plugin, $plugins );
   if ( false !== $key ) {
   unset( $plugins[ $key ] );
   }
   }
  
   return $plugins;
  }
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>I guess I should mention that:</p>
  
  <ol>
  <li>The first example will disable the plugin on all pages except for /subpage/</li>
  <li>The second code will disable all the listed plugins on /subpage/</li>
  </ol>
  
  <p>Neither of them work for frontpage/homepage, no matter what I try.</p>