Skip to main content

I need to add a condition to hide elements from the Portal Home Page when users are not logged in. This code doesn't work for me:  {% if portal.is_not_login_page %} so I need smth to say when users are not logged in. Anyone has any ideas? Please help... :) 



Hi Victoria,


We're using this liquid here to determine if customers are logged in or not to show/hide the edit profile/logout buttons on our header.

                     {% if portal.has_user_signed_in == true %}



<a href="{{ portal.profile_url }}">Edit Profile</a>

<a href="{{ portal.logout_url }}">Log Out</a>

{% else %}

<p> Whatever else you want to show when there is a logged in user</p>

{% endif %}


Good luck!