Free ON WEBFLOW.IO DOMAINS
How to hide elements when user is logged out
Conditionally hide elements on your page based on the customer's login state using custom CSS and Shopyflow's authentication state management.
You can use custom CSS in your page's head section to hide elements when the user is logged out.
In this example, we select an element with the element-to-hide class and hide it when the user is not logged in. Change the selector to fit your use case.
<style>
[sf-logged-out] .element-to-hide {
display: none;
}
</style>
Shopyflow manages the customer's authentication state and reflects it on the page. You can use this to show account-specific content only to logged-in customers, or display a login prompt to logged-out visitors.
No items found.
No items found.
No items found.
Next: