How to get user to register or login
-
Hi, I’m wondering how could I modify the template so user has to register or login (if already registered) before he can see the website content.
I mean to display WP standard login or register form. I used next code:
<?php
/*
Template Name: Logged-In Users Page
*/
?><?php if(is_user_logged_in()):?>
Next on the very bottom of the file:<?php else:
wp_die(‘Sorry, you must first log in to view this page. You can register free here.’);
endif;?>but this is redirection and besides, the register action does not seem to be working.
When I use header(/wp-login.php) I’m getting arrors about ‘header already send’.
Help pls.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to get user to register or login’ is closed to new replies.