Hi I was wondering whether anybody knows if it is possible to add a Greeting for logged in customers in the whitespace on the product collection main pages. We have a couple of category pages and would like to add a โHi Logged in customer Xโ kind of message. Any suggestions would be amazing 
And if possible when viewed on mobile to appear here just below the title. Happy to have it appear underneathe the title on both views if that is the only possible solution. We are using the Dawn theme 2.0
@Wildbloomsau - it can be done but it will need code editing where we need to check if user on site is customer logged in and if it is then display its name on the location you want
Ok Thanks I had a feeling it was possible, is there anyone that knows how to do this with coding and would be happy to help out?
Hi @Wildbloomsau , itโs Layoutbase here.
We would like to provide you with our thoughts on your question.
- Go to Online Store->Theme->Edit code
- Sections/main-collection-banner.liquid โ find h1 tag, after that, replace with code below.
#
{{ 'sections.collection_template.title' | t }}:
{{- collection.title | escape -}}
{% if customer %}
Hi Logged in customer {{ customer.name }}
{% endif %}
- Assets/base.css โ add the code below to the bottom of the file.
.title-customer { display: flex; align-items: center;}
.greeting { margin-left: auto;}
@media screen and (max-width: 749px) {
.title-customer { flex-flow: column; }
.greeting { margin-right: auto;}
}
Hope you find our suggestion helpful.
Best regards,
Layoutbase
1 Like
@Wildbloomsau - you can try code given by @layoutbase , it is correct code
Thank you so much this works!!