Re: Setting a different page as your landing page / home page

Setting a different page as your landing page / home page

korrupt
Visitor
1 0 2

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

Replies 11 (11)

Techify0639
Visitor
1 0 0

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.

stefaniebarre
Visitor
2 0 0

Yes. Typical shopify road block

areynolds76
Visitor
1 0 1

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!!

shuanlarry
Visitor
2 0 0

There’s a workaround, you could setup a redirect from your home page url to your landing page

Website_tech
Visitor
2 0 0

How do you do the workaround?

Cal35
Tourist
4 0 3

{%- 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!

User_name1
Tourist
3 0 1

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

Runners_Frame
Visitor
1 0 0

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

MHS2024
Not applicable
1 0 0

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! 

 

BlankStudio
Explorer
69 2 27

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
Template creation.PNG


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
Landing Page creation.PNG
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.
Home Page creation.PNG
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!

BlankStudio
Explorer
69 2 27

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
Template creation.PNG


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
Landing Page creation.PNG
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.
Home Page creation.PNG
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!