• Resolved dsheen20

    (@dsheen20)


    Hi all,

    I am trying to get the register link on my blog to hide when a user is logged in, even though that when you click on it, it does say ‘Your logged in’ but I just don’t want it to be there at all to click on.

    I am using the plugins ‘Theme My Login’ for the login and profile page for users, and ‘Simplr User Registration Form’ for the register page. After looking on this support forum I have found there is a way with PHP code to hide it, but I can’t seem to find where to even place this code. I am very new to wordpress so this is why I am seeking help here.

    The blog link: https://briddlemedia.com/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You’ll need to open up your sidebar.php file or wherever that link is, and find the code for it. You then need to replace it with something like this:

    <?php
    if ( is_user_logged_in() ) {
        echo 'Welcome, registered user!';
    } else {
        echo '<ul class="tml-action-links">';
        echo '<li><a href="https://briddlemedia.com/login/?action=register" rel="nofollow">Register</a></li>';
        echo '<li><a href="https://briddlemedia.com/login/?action=lostpassword" rel="nofollow">Lost Password</a></li>';
        echo '</ul>';
    }
    ?>

    Basically that piece of code is saying ‘Welcome, registered user!’ if the user is logged in, and if not, gives the Register & Forget Password links currently on your site.

    Thread Starter dsheen20

    (@dsheen20)

    It isn’t in the sidebar and because it was all added by plugins I have not got a clue where it would be, I have tried looking in so many places but can’t find it.

    You may have to speak with the plug-in developer then.

    Which register link are you talking about?

    Thread Starter dsheen20

    (@dsheen20)

    Hi,

    Sorry about not updating. But I had my design integrated within the theme now, and managed to delete those links.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove register link from navigation when logged in’ is closed to new replies.