How can i add image icons

Solved

How can i add image icons

Pyimk
Explorer
50 2 3

I am using Craft theme.
To get social proof, i want to add the tv and news channels that shows my product.
How can i add something like this one under "As seen On"

0-02-06-2ea0dab302e8602d7db845c6818239663bfacee9be61f23cc13e9aa3c8f3a709_2895030103e.png

Accepted Solution (1)
Huptech-Web
Shopify Partner
1152 230 261

This is an accepted solution.

Hello @Pyimk

Here's a step-by-step guide to add a new section in Shopify:

  1. Navigate to the Theme Library:

    • Go to your Shopify admin dashboard.
    • Click on "Online Store" in the left sidebar.
    • Then, click on "Themes".
  2. Access the Code Editor:

    • In the Themes section, find your current theme and click on "Actions".
    • From the dropdown menu, select "Edit code".
  3. Proceed to Add a New Section:

    • In the code editor, locate the "Sections" folder on the left sidebar.
    • Click on "Add a new section".
  4. Assign a Name:

    • In the popup that appears, enter a name for the new section, such as icons. Shopify will automatically append .liquid, so the file will be named icons.liquid.
    • Click "Create section".
  5. Paste the Code:

    • Once the new section is created, you will see an empty file.
    • Copy the code you provided and paste it into the icons.liquid file.
  6. Save Changes:

    • After pasting the code, click "Save" in the top right corner of the code editor.
      Screenshot_37.png

 

 

{% style %}

.icons-section .heading {
    text-align: center;
}
.icons-section .heading h4 {
    text-transform: capitalize;
    font-weight: bold;
}
.icons-section .row {
    display: flex;
    column-gap: 30px;
    justify-content: center;
}
.icons-section .row .col img {
    width: 100px;
    height: auto;
    object-fit: contain;
    box-shadow: 3px 3px 6px 7px whitesmoke;
    border-radius: 50%;
}
  
{% endstyle %}

<div class="icons-section">
  <div class="container">
    <div class="inner-icons">
      <div class="heading">
      {% if section.settings.heading != '' %}
        <h4>{{ section.settings.heading }}</h4>
      {% endif %}
      </div>

      <div class="row">
        {% for block in section.blocks %}
          <div class="col">
            {% if block.settings.icons != '' %}
              <img src="{{ block.settings.icons | img_url: 'master' }}" alt="{{ block.settings.icons.alt }}">
            {% endif %}
          </div>
        {% endfor %}
      </div>
    </div>
  </div>
</div>

{% schema %}
{
  "name": "Icons",
  "tag": "section",
  "class": "icons_section",
  "blocks": [
    {
      "name": "Icons",
      "type": "Icons",
      "settings": [
        {
          "type": "image_picker",
          "id": "icons",
          "label": "Icons"
        }
      ]
    }
  ],
  "settings": [
    {
      "type": "text",
      "id": "heading",
      "label": "Heading"
    }
  ],
  "presets": [
    {
      "name": "Icons",
      "settings": {}
    }
  ]
}
{% endschema %}
​

 

 

Please take a look at the screenshots.
Screenshot_38.pngScreenshot_39.png

Feel free to reach out if you have any additional questions. If this solution is helpful, please consider liking and accepting it.
S.P

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Replies 4 (4)

Huptech-Web
Shopify Partner
1152 230 261

Good day @PyimkKindly provide me with the link to your code editor so that I can assist you in adding custom code for better understanding.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Pyimk
Explorer
50 2 3

I am not sure about what you meant by link to code editor.
However, this is my website link, https://findla.co/
This website contain the "As Seen On" that I mentioned. https://go.tryxwrap.com/index-00169

Huptech-Web
Shopify Partner
1152 230 261

This is an accepted solution.

Hello @Pyimk

Here's a step-by-step guide to add a new section in Shopify:

  1. Navigate to the Theme Library:

    • Go to your Shopify admin dashboard.
    • Click on "Online Store" in the left sidebar.
    • Then, click on "Themes".
  2. Access the Code Editor:

    • In the Themes section, find your current theme and click on "Actions".
    • From the dropdown menu, select "Edit code".
  3. Proceed to Add a New Section:

    • In the code editor, locate the "Sections" folder on the left sidebar.
    • Click on "Add a new section".
  4. Assign a Name:

    • In the popup that appears, enter a name for the new section, such as icons. Shopify will automatically append .liquid, so the file will be named icons.liquid.
    • Click "Create section".
  5. Paste the Code:

    • Once the new section is created, you will see an empty file.
    • Copy the code you provided and paste it into the icons.liquid file.
  6. Save Changes:

    • After pasting the code, click "Save" in the top right corner of the code editor.
      Screenshot_37.png

 

 

{% style %}

.icons-section .heading {
    text-align: center;
}
.icons-section .heading h4 {
    text-transform: capitalize;
    font-weight: bold;
}
.icons-section .row {
    display: flex;
    column-gap: 30px;
    justify-content: center;
}
.icons-section .row .col img {
    width: 100px;
    height: auto;
    object-fit: contain;
    box-shadow: 3px 3px 6px 7px whitesmoke;
    border-radius: 50%;
}
  
{% endstyle %}

<div class="icons-section">
  <div class="container">
    <div class="inner-icons">
      <div class="heading">
      {% if section.settings.heading != '' %}
        <h4>{{ section.settings.heading }}</h4>
      {% endif %}
      </div>

      <div class="row">
        {% for block in section.blocks %}
          <div class="col">
            {% if block.settings.icons != '' %}
              <img src="{{ block.settings.icons | img_url: 'master' }}" alt="{{ block.settings.icons.alt }}">
            {% endif %}
          </div>
        {% endfor %}
      </div>
    </div>
  </div>
</div>

{% schema %}
{
  "name": "Icons",
  "tag": "section",
  "class": "icons_section",
  "blocks": [
    {
      "name": "Icons",
      "type": "Icons",
      "settings": [
        {
          "type": "image_picker",
          "id": "icons",
          "label": "Icons"
        }
      ]
    }
  ],
  "settings": [
    {
      "type": "text",
      "id": "heading",
      "label": "Heading"
    }
  ],
  "presets": [
    {
      "name": "Icons",
      "settings": {}
    }
  ]
}
{% endschema %}
​

 

 

Please take a look at the screenshots.
Screenshot_38.pngScreenshot_39.png

Feel free to reach out if you have any additional questions. If this solution is helpful, please consider liking and accepting it.
S.P

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Pyimk
Explorer
50 2 3

Thanks, It works and it helps me a lot.