Re: I want to create section which should be same on all pages where I have added

I want to create section which should be same on all pages where I have added

Mobii
Shopify Partner
1 0 0

I want to create a section that should be the same on all pages where I have added,
Like I have a section name Testimonials which has the same content on every page. I want to change the content on a page and it should be reflected on all other pages, I don't want to go on every page and change the content.
I am using JSON templates.

Replies 3 (3)

SocialAutoPost
Shopify Partner
434 59 107

To create a section in your Shopify store that is the same on all pages, you can use the following steps:

  1. In the Shopify admin, go to Online Store > Themes, and click on the theme that you want to edit.

  2. Click on the Actions button, and select Edit code from the dropdown menu.

  3. In the Templates folder, click on the template file for the page where you want to add the section. For example, if you want to add the section to the homepage, you would click on the index.liquid file.

  4. Scroll to the location in the template where you want to add the section, and add the following code:

 

{% section 'testimonials' %}

 

 

This code will include the testimonials section on the page.

  1. Save the template file, and repeat this process for any other pages where you want to include the testimonials section.

  2. To edit the content of the testimonials section, go to Online Store > Themes, and click on the Customize theme button.

  3. In the Sections tab, click on the testimonials section, and make any changes to the content that you want.

  4. Click on the Save button, and the changes will be reflected on all pages where the testimonials section is included.

By using this approach, you can create a section that is the same on all pages, and easily edit the content of the section in one place. This can save time and effort, and ensure that your content is consistent and up-to-date across all pages of your store.

 

 

If you want to automate your review system by adding text/video reviews I will recommend you can use free app https://www.reviewreels.app/ They offer free customization to add text/video reviews for your shopify store.

 

Was the reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution
Auto post your Shopify products to Instagram, Facebook, Pinterest, LinkedIn and Twitter.
App: Social Schedular
jkeown
Shopify Partner
2 0 0

How would you use a modular section on different pages with page specific content? 

I'm trying to create a page jumbotron that has section settings for title, subtitle, and background image but changing the settings changes all the pages using the section. My code:

sections/page_jumbo.liquid

 

 

<section class="jumbo" style="background-image: url({{ section.settings.bgimage | image_url }})">
  <div class="content">

  {% if section.settings.title == '' %}
    <h1>{{page_title}}</h1>
  {% else %}
    <h1>{{section.settings.title}}</h1>
  {% endif %}
  
    <p class="subtitle">{{section.settings.subtitle}}</p>
  </div>
</section>

{% schema %}
{
  "name": "Page Jumbotron",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "Title Text"
    },
    {
      "type": "text",
      "id": "subtitle",
      "label": "SubTitle Text",
      "default": "Supporting SubTitle here"
    },
    {
      "type": "image_picker",
      "id": "bgimage",
      "label": "Background Image"
    }
  ],
  "presets": [
    {
      "name": "Page Jumbotron"
    }
  ]
}

{% endschema %}

 

 

 

 

I'm working using Theme Kit learning to convert to modular sections.  Thank you for your time

 

jkeown
Shopify Partner
2 0 0

Just in case anyone else has the same issue: it appears to persist page specific section data, each JSON Template needs its own  liquid file in the sections directory.

{
  "sections":{
    "main":{
      "type": "Specific Liquid File Name"
    }
  },
  "order":[
    "main"
  ]
}