Problem when creating a new page

Problem when creating a new page

SamuelVaagal
New Member
9 0 0

Hi.

I am having a problem when creating a new page. The Problem is that no matter what, all new pages I create displays the same "about us" page. I have even tried pasting the URL of the new page to a button on the homepage, but still it displays the content of the about page on the new URL. No matter what URL for new pages I create within Shopify, the same about us page is displayed. When I paste a YouTube URL however, it redirects to YouTube. 

Anyone have a clue what's going on here? xD

Replies 7 (7)

pawankumar
Shopify Partner
716 102 123

Hi @SamuelVaagal 
It may be the case that in default page template page.liquid, content is hardcoded instead of {{page.content}}
So, Please check template on the pages that you are creating and then check liquid code of the template if it is hardcoded. 
If it is hardcoded then you can create separate template for about page and for all other pages use default page template, and replace code of the page.liquid with default theme code

Please check if it is helpful to you
Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
SamuelVaagal
New Member
9 0 0

Thank you so much for your reply! Would you be able to describe how I should do this with images? I am very new to the Shopify system and not so good at navigating the platform yet.

Thank you so much in advance.

pawankumar
Shopify Partner
716 102 123

Can you please share screenshots of shopify page backend where template is assigned and click edit code and take screenshot of page.liquid
so that I can check it and see if I can help
Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
SamuelVaagal
New Member
9 0 0

This is my page.liquid:

{{ 'section-main-page.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

<div class="color-{{ section.settings.color_scheme }} gradient">
<div class="page-width page-width--narrow section-{{ section.id }}-padding">
<h2 class="page-title {{ section.settings.heading_size }}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
{%- if section.settings.page.title != blank -%}
{{ section.settings.page.title | escape }}
{%- else -%}
{{ 'sections.page.title' | t }}
{%- endif -%}
</h2>
<div class="rte{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
{%- if section.settings.page.content != blank -%}
{{ section.settings.page.content }}
{%- else -%}
<div class="page-placeholder-wrapper placeholder">
{{ 'page' | placeholder_svg_tag: 'page-placeholder' }}
</div>
{%- endif -%}
</div>
</div>
</div>

{% schema %}
{
"name": "t:sections.page.name",
"tag": "section",
"class": "section",
"disabled_on": {
"groups": ["header", "footer"]
},
"settings": [
{
"type": "page",
"id": "page",
"label": "t:sections.page.settings.page.label"
},
{
"type": "select",
"id": "heading_size",
"options": [
{
"value": "h2",
"label": "t:sections.all.heading_size.options__1.label"
},
{
"value": "h1",
"label": "t:sections.all.heading_size.options__2.label"
},
{
"value": "h0",
"label": "t:sections.all.heading_size.options__3.label"
}
],
"default": "h1",
"label": "t:sections.all.heading_size.label"
},
{
"type": "color_scheme",
"id": "color_scheme",
"label": "t:sections.all.colors.label",
"default": "scheme-1"
},
{
"type": "header",
"content": "t:sections.all.padding.section_padding_heading"
},
{
"type": "range",
"id": "padding_top",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_top",
"default": 36
},
{
"type": "range",
"id": "padding_bottom",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_bottom",
"default": 36
}
],
"presets": [
{
"name": "t:sections.page.presets.name"
}
]
}
{% endschema %}

pawankumar
Shopify Partner
716 102 123

@SamuelVaagal 
Please try this code

{{ 'section-main-page.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

<div class="color-{{ section.settings.color_scheme }} gradient">
<div class="page-width page-width--narrow section-{{ section.id }}-padding">
<h2 class="page-title {{ section.settings.heading_size }}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
{%- if page.title -%}
{{page.title}}
{%- elsif section.settings.page.title != blank -%}
{{ section.settings.page.title | escape }}
{%- else -%}
{{ 'sections.page.title' | t }}
{%- endif -%}
</h2>
<div class="rte{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
{%- if page.content -%}
{{page.content}}
{%- elsif section.settings.page.content != blank -%}
{{ section.settings.page.content }}
{%- else -%}
<div class="page-placeholder-wrapper placeholder">
{{ 'page' | placeholder_svg_tag: 'page-placeholder' }}
</div>
{%- endif -%}
</div>
</div>
</div>

{% schema %}
{
"name": "t:sections.page.name",
"tag": "section",
"class": "section",
"disabled_on": {
"groups": ["header", "footer"]
},
"settings": [
{
"type": "page",
"id": "page",
"label": "t:sections.page.settings.page.label"
},
{
"type": "select",
"id": "heading_size",
"options": [
{
"value": "h2",
"label": "t:sections.all.heading_size.options__1.label"
},
{
"value": "h1",
"label": "t:sections.all.heading_size.options__2.label"
},
{
"value": "h0",
"label": "t:sections.all.heading_size.options__3.label"
}
],
"default": "h1",
"label": "t:sections.all.heading_size.label"
},
{
"type": "color_scheme",
"id": "color_scheme",
"label": "t:sections.all.colors.label",
"default": "scheme-1"
},
{
"type": "header",
"content": "t:sections.all.padding.section_padding_heading"
},
{
"type": "range",
"id": "padding_top",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_top",
"default": 36
},
{
"type": "range",
"id": "padding_bottom",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_bottom",
"default": 36
}
],
"presets": [
{
"name": "t:sections.page.presets.name"
}
]
}
{% endschema %}

replace page.liquid with this
Please check if it works for you

Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
SamuelVaagal
New Member
9 0 0

I replaced the page.liquid with the code you sent but it did not work unfortunately 😞

SamuelVaagal
New Member
9 0 0

Problem is solved! All you need to do is create a new template for each page so that there ar not multiple pages on the same template 🙏🏼