Hiding an area when user is not logged in

Solved6 replies2 participantsUpdated by tuijatuulia

  • Avatar: tuijatuulia
    tuijatuulia
    Participant

    I wish to show GDPR-related area on MyAccount page when user is logged in, because this is the same page that is also used for Login/Register when not logged in.

    So, what am I doing wrong..I added this to Additional CSS and area disappeared well but now I cannot see it even when I am logged in..? Do you have some tip please?

    .ct-ultimate-gdpr-container{
    display:none;
    }
    /* to show area only to logged in users */
    .logged-in.ct-ultimate-gdpr-container {
    display: block !important;
    }

    6 Answers

    Avatar: Rose Tyler
    Rose Tyler
    Support staff

    Hello,

    Just a bit change the code: https://prnt.sc/vf2uy2

    .ct-ultimate-gdpr-container{
     display:none;
    }
    /* to show area only to logged in users */
    .logged-in .ct-ultimate-gdpr-container {
     display: block !important;
    }

    Regards

    Avatar: tuijatuulia
    tuijatuulia
    Participant

    Hi, thanks for the message. I checked the space – there is no extra space now – but still I cannot see the area when logged in. I stored this code to Elementor Additional CSS field. I add here login information if you can check this please.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff

    Hello,

    Please check now.

    Regards

    Avatar: tuijatuulia
    tuijatuulia
    Participant

    Oh yes, you are the best! What did you do – I find the code to be the same?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff

    You’re welcome!
    Before – https://prnt.sc/vf4t7p , now – https://prnt.sc/vf4teq

    Regards

    Avatar: tuijatuulia
    tuijatuulia
    Participant

    oh it needs to be separated with a space.. thank you so much.

The issue related to '‘Hiding an area when user is not logged in’' has been successfully resolved, and the topic is now closed for further responses