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

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
Astronaut
834 94 177
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 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
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
Highlighted
Shopify Partner
1704 47 151

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 the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
1 Like