title: Wordpress function theme redirect determined by user IP address
body: <p><br /></p>
  
  <p><strong>THE IDEA</strong></p>
  
  <p>I would like to develop a new wordpress theme, whilst my old theme stays active during the new theme development.</p>
  
  <p>The function which will do the theme redirect will go in the current activated theme functions.php - and I will manually type <strong>my theme name</strong> and <strong>my IP</strong> into the function.</p>
  
  <p>Would be awesome if you could add an array of IP's so clients can check progress.</p>
  
  <p><br /></p>
  
  <p><strong>PROBLEMS I CAN THINK OF...</strong></p>
  
  <ol>
  <li>New content I add to the wordpress cms, will appear on the live theme - <strong><em>Yes, this will happen, but in my situation, my current live theme is just a holding page, with theme template files redirecting via php header redirects to the home page - and there are no loops to see any worpress content</em></strong></li>
  <li>A delay/flash may appear between pages loading - <strong><em>This is also not an issue for me as this is only a dev site, and this problem will disappear upon go live</em></strong></li>
  </ol>
  
  <p>that is all the problems I can think of, if anyone can think of other possible problems please post :-)</p>
  
  <p><br /></p>
  
  <p><strong>FUNCTION CODE</strong></p>
  
  <p>This code below is not working...</p>
  
  <pre><code>    // THEME IP REDIRECT
      add_filter('template', 'dev_theme');
      add_filter('option_template', 'dev_theme');
      add_filter('option_stylesheet', 'dev_theme');
      function dev_theme($theme) {
          if ( $_SERVER['REMOTE_ADDR'] == 'XXX.XX.XXX.XXX' ) {
              return 'development-theme-name';
          }
          return $theme
      }
  </code></pre>
  
  <p><br /></p>
  
  <p>If anybody thinks they could solve this question, it would hugely helpful and a pretty awesome function.</p>
  
  <p>Obviously depends whether there are any compilations with the idea.</p>
  
  <p><br /></p>
  
  <p>Thanks in advance  </p>