Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Shopify Community Downtime: The Shopify Community will be down December 5th for 15 minutes between 3pm and 4pm EST. Thank you for your understanding.

Re: How do I get my pop on to appear on the homepage only?

Solved

How do I get my pop on to appear on the homepage only?

lailas26
Visitor
2 0 0

Hi There, 

 

I have embedded a pop up form code onto my website for newsletter signups however, it is appearing on every single page which is annoying. How do I make it so that the pop up only appears on the homepage? I am using the Trade theme and my store link is https://manimagicnailbar.co.za

 

I've gone into my theme's code an don't see a CSS file anywhere so not sure what to do. 

 

Please help

 

Thanks

Laila

Accepted Solution (1)

Darshanp712
Shopify Partner
137 21 18

This is an accepted solution.

Hello @lailas26, If you have put a code into your snippet or section liquid file then put the condition on it like below.

{% if template == "index" %}

<!-- your embedded code -->

{% endif %}

 and if you want to add it from the other resources like a third-party widget then do the CSS changes or else you have to get support for that third-party widget. Do the CSS changes like below. We can make a snippet of CSS or put this CSS in the "theme.liquid" file.

{% if template == "index" %}
<style>
div#popup-jTg95HqKNrDOnQsXN3rv-overlay{
   display: flex;
}
</style>
{% else %}
<style>
div#popup-jTg95HqKNrDOnQsXN3rv-overlay{
   display: none;
}
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as a Solution!

Best Regards,
Darshan Prajapati

Helpful? then please Like and Accept the Solution.
For any inquiries, please feel free to contact via WhatsApp and Email: sales@dolphinwebsolution.com.
For more information visit our website Dolphin Web Solution.

View solution in original post

Replies 3 (3)

Darshanp712
Shopify Partner
137 21 18

This is an accepted solution.

Hello @lailas26, If you have put a code into your snippet or section liquid file then put the condition on it like below.

{% if template == "index" %}

<!-- your embedded code -->

{% endif %}

 and if you want to add it from the other resources like a third-party widget then do the CSS changes or else you have to get support for that third-party widget. Do the CSS changes like below. We can make a snippet of CSS or put this CSS in the "theme.liquid" file.

{% if template == "index" %}
<style>
div#popup-jTg95HqKNrDOnQsXN3rv-overlay{
   display: flex;
}
</style>
{% else %}
<style>
div#popup-jTg95HqKNrDOnQsXN3rv-overlay{
   display: none;
}
</style>
{% endif %}

 

If I managed to help you then, don't forget to Like it and Mark it as a Solution!

Best Regards,
Darshan Prajapati

Helpful? then please Like and Accept the Solution.
For any inquiries, please feel free to contact via WhatsApp and Email: sales@dolphinwebsolution.com.
For more information visit our website Dolphin Web Solution.
lailas26
Visitor
2 0 0

Thank you so much! This seems to have done the trick!

Darshanp712
Shopify Partner
137 21 18

@lailas26 You are most welcome 😊. If anything is required further or still having any doubt then surely you can contact me. 

Best Regards,
Darshan Prajapati

Helpful? then please Like and Accept the Solution.
For any inquiries, please feel free to contact via WhatsApp and Email: sales@dolphinwebsolution.com.
For more information visit our website Dolphin Web Solution.