How to check if there is a user is loggedin? Normaly you do this like:
if ( is_user_logged_in() ) { // do something }
but how you do this within a Timber template? some thing like?:
{% if userloggedin %} //do somthing {% endif %}
How to check if there is a user is loggedin? Normaly you do this like:
if ( is_user_logged_in() ) { // do something }
but how you do this within a Timber template? some thing like?:
{% if userloggedin %} //do somthing {% endif %}
Found it already, to do this you can use the ‘user’ object:
{% if user %}
Hello {{ user.user_nicename }}
{% else %}
you are not loggedin
{% endif %}