How can I create my own custom pages and access them via URL

AzeemHaider
New Member
10 0 0

I'm trying to create a theme for shopify. I'm new in theme development. 

 

I want to know how can I add my custom page in shopify theme liquid.

 

What I'm trying is.

 

1- Create file (custom-brand.liquid) in template folder.

2- access it via URL https://localhost:3000/custom-brand <===== Error: 404

 

How can I create my own custom page while developing theme.

0 Likes
Ninthony
Shopify Partner
1964 296 777
I'm not sure I understand. There is no way to truly develop locally on shopify, you'll always need an internet connection. You can use Theme Kit to develop on your machine and watch your files, so you can work in your favorite editor. To work on adding a new feature that you want to test for a bit before you make it live, you can duplicate your theme and make your changes on the duplicate, then when you are ready to push the changes live you can just publish that theme.
If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
AzeemHaider
New Member
10 0 0

Sorry to say but you not understanding my question. It's not about local development or remote one it's about creating a custom page and how we can find URL of this page.

 

I'm using Shopify Slate for theme development. 

 

I want to create a page for my brands (e.g custom-brands)

 

What I'm trying to achieve this is.

1 - I'm creating new file (custom-brands.liquid) under template folder

2- Try to access this file from my shop URL (e.g shop-name.myshopify.com/custom-brands) 

But this one is responding back an Error 404 (which mean my site is not able to locate this page)

 

I want to ask how can I create custom pages and access it via URL.

 

How can I create my own custom page while developing theme.

0 Likes
PaulNewton
Shopify Partner
2581 136 471

Shopify has predefined url endpoints, 

There is no url(/custom-brands) , or content created because you make a theme file currently.

Currently if you make custom-brand.liquid that has to be a  snippet,section,asset,or layout that is used as part of a template for content.

Or an alternate template.

 

  • To create a page '/page/custom-brands' use the shopify.com/admin/pages.
  • Pages default to using the page.liquid template by default.
  • In page.liquid you can include /snippets/custom-brand.liquid using {% include 'custom-brand' %} with a conditional matching the page handle
  • OR change custom-brand.liquid to be an alternate template :
    • /templates/page.custom-brand.liquid
    • then in the shopify.com/admin/pages find the page you want and assign the alternate template
    • or force the alternate template by using the view parameter ?view=custom-brand

At this point I recommend you start at the beginning with shopifys theme documentation to remove assumptions about it's systems.

https://help.shopify.com/en/themes/development.

 

Then to have the url  /custom-brands it will have to be a redirect that still points to another EXISTING piece of content.

https://help.shopify.com/en/manual/sell-online/online-store/menus-and-links/url-redirect

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
icemancml
New Member
1 0 0

Did you figured out? I want to create for example the About page and other pages like you and just use shopifyurl/pagename. 

0 Likes
hauvq
Tourist
7 0 1

Do you solve this problems. I've same issue as well.


@AzeemHaider wrote:

Sorry to say but you not understanding my question. It's not about local development or remote one it's about creating a custom page and how we can find URL of this page.

 

I'm using Shopify Slate for theme development. 

 

I want to create a page for my brands (e.g custom-brands)

 

What I'm trying to achieve this is.

1 - I'm creating new file (custom-brands.liquid) under template folder

2- Try to access this file from my shop URL (e.g shop-name.myshopify.com/custom-brands) 

But this one is responding back an Error 404 (which mean my site is not able to locate this page)

 

I want to ask how can I create custom pages and access it via URL.

 

How can I create my own custom page while developing theme.




0 Likes
hauvq
Tourist
7 0 1

Do you have any solution for this problem ?


@icemancml wrote:

Did you figured out? I want to create for example the About page and other pages like you and just use shopifyurl/pagename. 


 

0 Likes
hardik355
Shopify Partner
99 7 11

Hello

It's easy to create page with url. please follow steps.

1.  In theme template create new file like page.your-file-name.liquid
2. After admin pages section create page. 

3. And after Theme template in right sidebar dropdown show your file which you created in template section.

4. Select your file and save.

5. Header you can check your URL.

filesave.png


Thanks. 

0 Likes
Xin_Wang
Tourist
4 0 1

Hi @hardik355 

The ideal url the Arthur would like to be `domain/customize-brand`, instead of `domain/pages/customize-brand`

Any solution on that?

Thanks

0 Likes
hardik355
Shopify Partner
99 7 11

hi @Xin_Wang 

I think this url generate shopify default. so i think it's not possible.


0 Likes