Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi all so i was wondering whether it was possible to set one of the shopify pages as the main homepage for the website? i.e instead of having the home page you start your theme with be the landing page could i set a different page as the landing page? or could i possibly assign a page template to the landing page / home page? im new to liquid so im not too sure how to do this
Hello Korrupt,
I don't think that's possible in Shopify.
We had the same issue. After connecting with their experts, we found that functionality is not available, like how in Wordpress you can choose which page you want to showcase as homepage, its not possible to have the same functionality in Shopify.
Else you have to hire a Shopify Expert, which is pretty weird. as on our website, we dont have control to show which page we want to know as homepage/landingpage and on top of that we need to pay Extra to get that basic functionality.
Yes. Typical shopify road block
Yes, this is a terrible/inexcusable gap in the Shopify site admin experience. I created a staging home page and now can't switch or assign the home page to this page. Now I have to duplicate this page on the existing home page! Sooo bad!!
There’s a workaround, you could setup a redirect from your home page url to your landing page
How do you do the workaround?
{%- if template contains 'index' -%}
<script>
window.location.href = '/products/(insert whatever is in the URL)';
</script>
{%- endif -%}
Click on the 3 dots next to customize theme and past this in the theme.liquid section near the top of the categories on the left. when you paste it make sure to paste it just above the head section. if you have any trouble with this message me back or paste what i just said in chatgpt and ask it to explain the steps better!
For added clarity:
Online Store --) 3 Dots next to "Customize" --) Edit Code --) Under the Layout folder, select the section "theme.liquid" --) Copy and past the line of code provided by user Cal35 above everything else you see in there --) modify the URL in the line of code so that it redirects to the webpage you want *only need to write the portion of the URL after the domain --) Save
Hello,
I am trying to set a page built with Gempages as my home page. It worked well with the code, but I would like to keep the visible URL basic (i.e. domain.com), or at least close to it (like domain/home), but I cannot get rid of "pages", so it looks like domain/pages/home. Is this something we can change?
Thank you
I was trying to find a way to set the Black Friday landing page I created as the temporary homepage until the end of the month and this work! Thank you!
The best way to make this possible in my opinion is by following these steps.
Step 1: Create the template.
You can create the template by going to Online Store > Customize > Default Page > Pages > Create Template
You need to create a template called landing to assign it with the page later.
Step 2: Create the Landing Page and link it.
Go to Online Store > Pages > Add Page and give it a title and description if you want.
Change the URL to /pages/welcome
Chose the "Landing Page" template you created earlier on the right side in the dropdown menu.
Step 3: Create the "Home Page".
Do the same thing but change the URL to /pages/home and the template leave it as Default page.
Creating a "Home" page that links to the Default template will redirect you to the homepage of your store rather than the "Landing Page" when you click on your logo
Step 4: Add the custom code.
Go to Online Store > Edit code.
Add this code BEFORE the <head> tag in Theme.liquid
{%- if template contains 'index' -%}
<script>
window.location.href = '/pages/welcome';
</script>
{%- endif -%}
In my case, I have the landing page as Welcome.
You need to add this code so when you open your site, it will redirect you to your landing page.
This method took me couple of hours to build.
I hope this helps in some way 🙂
Let me know if you need help!
The best way to make this possible in my opinion is by following these steps.
Step 1: Create the template.
You can create the template by going to Online Store > Customize > Default Page > Pages > Create Template
You need to create a template called landing to assign it with the page later.
Step 2: Create the Landing Page and link it.
Go to Online Store > Pages > Add Page and give it a title and description if you want.
Change the URL to /pages/welcome
Chose the "Landing Page" template you created earlier on the right side in the dropdown menu.
Step 3: Create the "Home Page".
Do the same thing but change the URL to /pages/home and the template leave it as Default page.
Creating a "Home" page that links to the Default template will redirect you to the homepage of your store rather than the "Landing Page" when you click on your logo
Step 4: Add the custom code.
Go to Online Store > Edit code.
Add this code BEFORE the <head> tag in Theme.liquid
{%- if template contains 'index' -%}
<script>
window.location.href = '/pages/welcome';
</script>
{%- endif -%}
In my case, I have the landing page as Welcome.
You need to add this code so when you open your site, it will redirect you to your landing page.
This method took me couple of hours to build.
I hope this helps in some way 🙂
Let me know if you need help!
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn 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, 2025