WordPress.org

Support

Support » How-To and Troubleshooting » Login link only for new users?

Login link only for new users?

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is the code I used in theme header.php file combining the both codes for redirection and user based Access. But it is broken

    <?php
    if ( is_user_logged_in() ) {
    echo ‘Welcome, registered user!’;
    } else {
    echo ‘” title=”Login”>Login‘;
    }
    ?>

    Does any one have Idea about this?

    Sorry ! There was a mistake in my last message. This is the actual code I tried, but failed :

    <?php
    if ( is_user_logged_in() ) {
    echo 'Welcome, registered user!';
    } else {
    echo '<a href =  "<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>';
    }
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Login link only for new users?’ is closed to new replies.
Skip to toolbar