title: Make Wordpress-blog totally private to logged out visitors?
body: <p>I'm building a Wordpress-site, where user needs to log in before access to the blog itself. For now, I've used this:</p>
  
  <pre><code>add_action('wp_head','foofunc');
  function foofunc() {
      if(!is_user_logged_in()) die();
  }
  </code></pre>
  
  <p>However, this way I cannot redirect the user to another url, as output has already started. Is there any way to redirect not-logged-in users to an url?</p>
  
  <p>I would user <code>init</code> but that redirects users in wp-admin too.</p>
  
  <p>Martti Laine</p>