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

Basically, I want to show non-logged in users a page that says 'register or log in.' But I want to show logged in users a standard homepage will all my posts.

share|improve this question
up vote 2 down vote accepted

Rarst's solution is indeed the simplest way to do it and the Members plugin also has heaps of other advantages.

You can also do it without a plugin, by using the is_user_logged_in() function

More info on http://codex.wordpress.org/Function_Reference/is_user_logged_in and http://codex.wordpress.org/Function_Reference/get_currentuserinfo#Parameters

share|improve this answer

Home page only or whole site?.. I assume latter as it makes more sense.

The simplest way I know is to use Members plugin and enable Private Blog option it has.

share|improve this answer

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.