Shopify themes, liquid, logos, and UX
I would like to add an email subscriber and a get it button like the picture shown above on the last column of my footer. Can anybody please help me with that? Thank you!
Link: https://2cb7cc-ab.myshopify.com/products/home-page
Pass: testpage
Solved! Go to the solution
This is an accepted solution.
Hi @NgocLe1 ,
You can try this one.
{% form 'customer' %}
{{ form.errors | default_errors }}
{% if form.posted_successfully? %}
<p>{{ 'general.newsletter_form.confirmation' | t }}</p>
{% else %}
<input type="hidden" name="contact[tags]" value="newsletter">
<input type="email"
name="contact[email]"
id="Email"
value="{% if customer.email != blank %}{{ customer.email }}{% endif %}"
placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
autocorrect="off"
autocapitalize="off">
<button type="submit" name="commit" id="Subscribe">
<span>{{ 'general.newsletter_form.submit' | t }}</span>
</button>
{% endif %}
{% endform %}
Thank you
Hi @NgocLe1 ,
Here is the code for the newsletter.
{% form 'customer' %}
<div class="email">
<label for="email">Email</label>
<input type="email" name="contact[email]" />
</div>
<div class="submit">
<input type="submit" value="Sign up" />
</div>
{% endform %}
https://shopify.dev/docs/themes/customer-engagement/email-consent
If you require further help to optimize or customize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
LuffyOnePiece
Sorry! That didn't work!
This is an accepted solution.
Hi @NgocLe1 ,
You can try this one.
{% form 'customer' %}
{{ form.errors | default_errors }}
{% if form.posted_successfully? %}
<p>{{ 'general.newsletter_form.confirmation' | t }}</p>
{% else %}
<input type="hidden" name="contact[tags]" value="newsletter">
<input type="email"
name="contact[email]"
id="Email"
value="{% if customer.email != blank %}{{ customer.email }}{% endif %}"
placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
autocorrect="off"
autocapitalize="off">
<button type="submit" name="commit" id="Subscribe">
<span>{{ 'general.newsletter_form.submit' | t }}</span>
</button>
{% endif %}
{% endform %}
Thank you
Thank you!
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025