Personalized checkout and custom promotions with Shopify Scripts
Hi guys,
Is it possible to disable link if no url exist. I just want to make it without `#` for exable "my-website.com/pages/products" instead of "my-website.com/pages/products#".
And if it's possible, the question is how can I make it if my page in .json format.
Thanks in advance!:)
Hi @DenDonnar,
I see you have asked two questions both of which are independent to each other. So I would like to answer both of your questions.
------------------------------------------------------------------------------------------------------------------------------
1. Yes you can implement a permanent redirect to URLs of your store which you don't want your visitors to see.
For this you need to follow the below steps:
1. Login to your admin panel of your store.
2. Go to Online Store > Navigation.
3. Click on View URL Redirects at the top right corner of your screen below the header as shown in image.
4. Then click on 'Create URL Redirect' at the top right corner.
5. Two fields will show up, in the first field enter the URL you want to replace/disable; In the second field enter the URL you want to replace it with. If you are not sure then simply redirect it to the homepage by entering '/' in the box. Click on submit button to save the URL.
6. Boom! you have successfully disabled a broken URL.
-----------------------------------------------------------------------------------------------------------------------------------
To create a page template in JSON format you need to first go to online store and select a specific theme in which you wish to add the JSON template.
a. Click on edit code. Shopify theme editor will open.
b. From the template sections click on Add a new template.
c. Select page from the list of options available and choose JSON in file type also add the custom name to your page template as shown in image. After you have done the above steps hit save. d. the file with your custom name would be visible on the screen. If your theme is 2.0 then automatically default JSON code will add to your template else you have to add the code for JSON template.
e. If no code is added then add the below code
{
"sections": {
"main": {
"type": "main-page",
}
},
"order": [
"main"
]
}
where you can replace the "main-page" with the name of the page template of yours theme.
f. Once you have done all the changes then congrats you have created a custom JSON template.
You can refer to https://shopify.dev/themes/architecture/templates/json-templates to understand more about shopify JSON templates.
Thanks & Regards
Kaal
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024