Hi! I’m looking to add a popup to my site with a basic yes/no question to segment my audience. I would like various sections of my homepage to be shown/hidden based on my customers’ selection in the popup. In addition, I’d like my header menu and announcement bars to have two versions, depending on the customers’ selection as well.
I can code okay, but I don’t know what would be the best way to do this. Any help? ![]()
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community! ![]()
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Thanks! Here it is: dansmaclasseboutique.com
do you need one popup if user first time then show popu and choose any option
Hi,
Yes that would be ideal if it can remember a customer’s selection based on cookies whether or not they are signed in.
@DMCB yes that possible bt cookies customization
Hi, @DMCB ,
Based on your request, we have analyzed your issue and you can achieve that using two scenarios,
- You have to add a page having a different page template and layout other than the default one.
- You have to restrict the use of the default homepage to just show the popup.
Once the visitor has chosen a layout then you can redirect them as per the visitor’s choice.
You have to also create a new layout for this specific page which you have to add to the top of the page template.
For Eg..: Create a new layout ‘theme.alternate.liquid’ and a new template such as
‘page-alternate.liquid’.
Include the new layout in the first line of the new template using {% layout ‘theme.alternate’ %}
You can learn more about creating a page having different layouts using the below link.
Let us know if you need any further assistance.
All the best,
CedCommerce