Support » Fixing WordPress » Login link only for new users?

Viewing 2 replies - 1 through 2 (of 2 total)
  • venug

    (@venug)

    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?

    venug

    (@venug)

    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.