UserPro Forums
  • Create new topic
  • Forums
    • No replies topics
    • Newest topics
    • Forum statistics
  • Account
    • Lost password
    • Register
    • Login
  • Documentation
  • Back to main site

Community Forums

User To User Support Forum/Forums/Support Questions (UserPro)/My Profile / Login / Log Out Area

My Profile / Login / Log Out Area

loginregisteruser accounts
  • 9 years, 5 months ago Avatarklsbo
    Participant

    Hey, I have a ‘My Profile’ link in the top nav and the dropdown of that link has Login, Register, Submit, Edit Profile , Log Out. How do I create it so when the user is logged in, that the ‘Register’ does not appear anymore? Same with when not signed in, the Log Out still shows. Is there a tweak in the user accounts to adjust this?

    9 years, 5 months ago AvatarJesse M.
    Participant

    I’m not the best coder in the world but..

    in header.php after the </head> add in..

    PHP
    1
    2
    3
    4
    5
    6
    7
        if ( ! is_user_logged_in() )
     
                $body_class .= &#039;not-logged-in&#039;;
     
        else
     
                $body_class .= &#039;logged-in&#039;;?&gt;

    in your styles.css – add in..

    PHP
    1
    2
    3
    4
    5
    6
    .not-logged-in .not__logged_in {
    display: none;
    }
    .logged-in .logged_in {
    display: none;
    }

    Now in Menus, go to options at the top and enable CSS classes in advanced properties. All you have to do now is add the logged_in or not__logged_in code into the css classes of each menu item.

    hope this helps Klsbo.

    9 years, 5 months ago AvatarJesse M.
    Participant

    the header.php code where ‘&#039’ is actually commas (sorry not able to swap them out in code mode)

    9 years, 5 months ago Avatarklsbo
    Participant

    @Jesse, thanks I’ll give this a try with my theme and let you know!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Disclaimer

This forum is 100% free and USER to USER support only. Technical support staff doesn’t monitor this forum actively.

If you are a customer and want to get technical support from our staff please submit a technical support ticket here: UserPRO Technical Support

Recent Topics

  • messy layout and signup not working
  • creating better layout
  • Custom Badges AddOn Plugin here
  • Green Trust Cash APplication
  • How to use cash app without a bank account

About forum

Here you can find help from UserPro plugin developers and other UserPro fellow users. Please be polite and ask your questions. NO SPAM!

Search Forums

Follow us

  • facebook
  • twitter
  • youtube
© Copyright UserPro