WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to block public access to my site while I developed a theme on a new domain. I was doing it with GD Press Tools' "Prevent website access if the user is not logged in" feature, because it's so damn easy to tick off a checkmark.

Strangely, it didn't work on my new theme.

You may say, "try another way of blocking public access", and I'd agree with you. But, it's worrying because it's not GD Press Tools' fault. The "prevent website access" feature is perfectly functional on the default twentyeleven theme. So basically I'm at fault somehow, and if GD Press Tools isn't liking it, I must've screwed up something major.

I've pastebin'd the entirety of my theme so far here. It's extremely bare and simple, consisting of index.php and style.css. *Note that pastebin isn't showing wp_head before the closing head tag, but it's there. My 404.php page is slightly custom, but commenting out the entirety of the file made no difference. You can view the code here.

I have no idea what is going on here. Would you mind taking a look at my code?

share|improve this question
up vote 1 down vote accepted

The plugin hooks get_header() to check if the user is logged in, your theme doesn't call get_header() so the check is never run.

share|improve this answer
Thanks! This was totally making me crazy today – bottles Sep 4 '11 at 4:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.