Move product page to home page (Sense theme)

StokesCrofter
Visitor
3 0 2

Hey guys! How can i move my product page to home page ?   Im using Sense theme.  www.petson.co.uk   pass 123 

Reply 1 (1)
ZestardTech
Shopify Expert
5079 906 1210

Hello @StokesCrofter 

 

To redirect your product page to the homepage on Shopify, you can follow these steps:

 

1.Access your Shopify theme editor: From your Shopify admin, go to "Online Store" and click on "Themes." Locate your active theme and click on "Actions" > "Edit Code."

 

2.Open the product.liquid template: In the theme editor, navigate to the "Templates" directory and find the product.liquid file.

 

3.Find the redirect code: Look for the code that handles the rendering of the product page. This code is typically found within the product.liquid template.

 

4.Add a redirect code: Insert the following code snippet at the beginning of the product.liquid file to redirect the product page to the homepage:

{% if template contains 'product' %}
  {% liquid_capture %}
    <script>
      window.location.href = '/';
    </script>
  {% endliquid_capture %}
{% endif %}

This code checks if the current template is the product page template (product.liquid) and if so, it adds a JavaScript redirect to the homepage ('/').

 

5.Save and test: Save the changes to the product.liquid file and preview your store. When you access a product page, it should automatically redirect to the homepage.

 

Please note that modifying the theme's code requires a good understanding of Liquid and Shopify theme development. If you're not comfortable making these changes yourself, it's recommended to consult with a Shopify developer or the theme's support for assistance.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing