WordPress Require Login / Walled Garden

January 27th, 2014

Place this in your functions.php file:


function walled_garden()
{
if( ! is_user_logged_in() )
wp_redirect( '/wp-login.php' );
}
add_action( 'get_header', 'walled_garden' );

Be Sociable, Share!

    Trackback URI | Comments RSS

    Leave a Reply

    **Commentor's URL Will be Followed