Skip to main content

How to Add a Social Proof Block in Shopify Product Page (Dawn Theme)

 Adding social proof to your product pages can significantly increase trust and conversion rates. In this tutorial, we'll show you how to add a stylish Verified Testimonials block to your Shopify store using the Dawn theme . This block displays user avatars, names, and a verified icon—all customizable from the theme editor. ✅ Step 1: Open the main-product.liquid file Go to your Shopify Admin. Navigate to: Online Store → Themes → Edit code . Open the file: sections/main-product.liquid . Now add this code exactly as I’ve shown in the video — and yes, make sure to test it on a duplicate theme first! Full Code {%- when 'verified-testimonials' -%} <style> .verified-testimonials-container-{{block.id}} .verified-testimonials-user-icon-img-class { width: {{block.settings.verified_use...

How to add Breadcrumbs in Shopify

 In the realm of e-commerce, user experience reigns supreme. Navigating through a website seamlessly can make or break a customer's journey. In the vast world of Shopify, where online stores flourish, one often-overlooked yet incredibly effective navigation aid is breadcrumbs.




What are Breadcrumbs?

Breadcrumbs are navigational aids typically displayed horizontally across the top of a webpage. They show the hierarchical structure of a website, allowing users to trace their path back to the homepage or any other higher-level page. Each segment of the breadcrumb represents a page the user has navigated through, with the last segment usually indicating the current page.

Implementing Breadcrumbs in Shopify

Adding breadcrumbs to your Shopify store can significantly improve user experience and make navigation more intuitive. Here’s a step-by-step guide on how to implement breadcrumbs in your Shopify store:

Step 1: Open the card-product file if you are using Dawn theme and this code | within: collection 






Step 2 : Create a Breadcrumbs Snippet

First, you need to create a new file called breadcrumbs.liquid in your snippets folder. Paste the provided code into this file. This code includes HTML and Liquid markup to generate breadcrumbs dynamically based on the current page's template.

<style>

  .breadcrumbs {

    margin: 0 0 2em;

    background-color: {{ settings.breadcrumb_bg_color }};

    padding-top: {{ settings.padding_top }}px;

    padding-bottom: {{ settings.padding_bottom }}px;

    padding-left: 20px;

  }


  .breadcrumbs__list {

    list-style-type: none;

    margin: 0;

    padding: 0;

  }


  .breadcrumbs__item {

    display: inline-block;

  }


  .breadcrumbs__item:not(:last-child):after {

    display: inline-block;

    content: '\00bb';

    margin: 0 .6em;

    color: #959fa5;

    font-size: {{ settings.font_size }}px;

  }


  .breadcrumbs__link {

    text-decoration: none;

    color: {{ settings.breadcrumb_text_color }};

    font-size: {{ settings.font_size }}px;

  }


  .breadcrumbs__link:hover {

    text-decoration: none;

  }


  .breadcrumbs__link[aria-current="page"] {

    color: #999 !important;

    font-weight: normal;

    text-decoration: none;

  }


  .breadcrumbs__link[aria-current="page"]:hover,

  .breadcrumbs__link[aria-current="page"]:focus {

    text-decoration: none;

  }


  .breadcrumbs__item:last-child:after {

    content: '';

  }


  .disabled-breadcrumb {

    color: #999 !important;

    pointer-events: none !important; 

    text-decoration: none !important; 

  }

</style>


{% unless template == 'index' or template == 'cart' or template == '404' %}

  {% assign t = template | split: '.' | first %}

  

  <nav class="breadcrumbs" role="navigation" aria-label="breadcrumbs">

    <ol class="breadcrumbs__list">

      <li class="breadcrumbs__item">

        <a class="breadcrumbs__link" href="/">Home</a>

      </li>

      {% case t %}

        {% when 'page' %}

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link" href="{{ page.url }}" aria-current="page">{{ page.title }}</a>

          </li>

        {% when 'product' %}

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link" href="/collections">Collections</a>

          </li>

          {% unless collection %}

            <li class="breadcrumbs__item">

              <a class="breadcrumbs__link" href="/collections/all">Products</a>

            </li>

          {% endunless %}

          {% if collection %}

            <li class="breadcrumbs__item">

              <a class="breadcrumbs__link" href="{{ collection.url }}">{{ collection.title }}</a>

            </li>

          {% endif %}

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link" href="{{ product.url }}" aria-current="page">{{ product.title }}</a>

          </li>

        {% when 'collection' %}

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link" href="/collections">Collections</a>

          </li>

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link" href="{{ collection.url }}" aria-current="page">{{ collection.title }}</a>

          </li>

          {% if current_tags %}

            <li class="breadcrumbs__item">

              <a class="breadcrumbs__link" href="/collections/{{ collection.handle }}">{{ collection.title }}</a>

            </li>

            <li class="breadcrumbs__item">

              <a class="breadcrumbs__link" href="{{ collection.url }}/tagged/{{ current_tags | join: '+' }}" aria-current="page">{{ current_tags | join: ' + ' }}</a>

            </li>

          {% endif %}

        {%- when 'blog' -%}

          {%- if current_tags -%}

            <li class="breadcrumbs__item">

              {{ blog.title | link_to: blog.url, class: "breadcrumbs__link" }}

            </li>

            <li class="breadcrumbs__item">

              {%- capture tag_url -%}{{ blog.url }}/tagged/{{ current_tags | join: "+" }}{%- endcapture -%}

              <a class="breadcrumbs__link" href="{{ tag_url }}" aria-current="page">{{ current_tags | join: ' + ' }}</a>

            </li>

          {%- else -%}

            <li class="breadcrumbs__item">

              <a class="breadcrumbs__link" href="{{ blog.url }}" aria-current="page">{{ blog.title }}</a>

            </li>

          {%- endif -%}

        {%- when 'article' -%}

          <li class="breadcrumbs__item">

            {{ blog.title | link_to: blog.url, class: "breadcrumbs__link" }}

          </li>

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link" href="{{ article.url }}" aria-current="page">{{ article.title }}</a>

          </li>

        {%- else -%}

          <li class="breadcrumbs__item">

            <a class="breadcrumbs__link disabled-breadcrumb" href="{{ request.path }}" aria-current="page">

              {{- page_title -}}

            </a>

          </li>

      {%- endcase -%}

    </ol>

  </nav>

{% endunless %}

Step 3: Update Settings Schema

Next, update your theme’s settings_schema.json file to include settings for customizing the breadcrumbs' appearance. These settings allow you to control the breadcrumb background color, text color, font size, and padding.

{ "name": "Breadcrumb Navigation", "settings": [ { "type": "checkbox", "id": "show_breadcrumb_nav", "label": "Show breadcrumb navigation", "default": true }, { "type": "color", "id": "breadcrumb_bg_color", "label": "Breadcrumb Background Color", "default": "#f8f9fa" }, { "type": "color", "id": "breadcrumb_text_color", "label": "Breadcrumb Text Color", "default": "#465076" }, { "type": "range", "id": "font_size", "min": 8, "max": 50, "step": 1, "unit": "px", "label": "Font size", "default": 18 }, { "type": "range", "id": "padding_top", "min": 0, "max": 50, "step": 1, "unit": "px", "label": "Padding Top", "default": 15 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 50, "step": 1, "unit": "px", "label": "Padding Bottom", "default": 15 } ] },

Step 4: Modify Theme.liquid
Finally, integrate the breadcrumbs into your theme by adding a conditional statement in your theme.liquid file. This statement checks if the "Show breadcrumb navigation" setting is enabled and, if so, renders the breadcrumbs snippet.

{%- if settings.show_breadcrumb_nav -%} {% render "breadcrumbs.liquid" %} {%- endif -%}

Benefits of Breadcrumbs
Enhanced User Experience: Breadcrumbs provide users with a clear path to navigate back to previous pages, reducing confusion and frustration.
Improved SEO: Breadcrumbs can improve your site’s SEO by providing search engines with additional context about the structure of your website.
Increased Engagement: By simplifying navigation, breadcrumbs encourage users to explore more pages within your Shopify store, potentially leading to increased engagement and conversions.
Customization Options With the provided code, you can customize various aspects of the breadcrumbs, including colors, font size, and padding, to ensure they seamlessly integrate with your store’s design and branding. Conclusion Breadcrumbs might seem like a small addition, but they can have a big impact on your Shopify store’s usability and overall success. By implementing breadcrumbs, you can enhance navigation, improve SEO, and ultimately create a more satisfying shopping experience for your customers. So why not take the next step towards enhancing your Shopify store’s navigation with breadcrumbs? Your customers will thank you for it!

Comments

  1. How do you add schema ld+jason script so Google would be able to read it?

    ReplyDelete
  2. Thans for this amazing guide can you share product schema?

    ReplyDelete

Post a Comment

Popular posts from this blog

How to create a Image scrolling/marquee section in Shopify theme

We are excited to unveil our latest addition to the customization options for your website: the Image Marquee section. This dynamic feature allows you to create a continuous scrolling display of your brand logos, offering a visually engaging way to showcase your partners, sponsors, or featured brands. Let's dive into the features and customization options available with the Image Marquee section. Key Features Continuous Scrolling Animation : The marquee animation provides a smooth, continuous scroll of images, giving your site a modern and dynamic feel. Responsive Design : The section is fully responsive, ensuring that your logos look great on desktops, tablets, and mobile devices. Customizable Speed and Direction : Adjust the scroll speed and choose the direction of the animation to fit your design preferences. Interactive Elements : You can enable or disable the pause-on-hover feature, giving visitors the option to pause the marquee for a closer look at the logos. Styling Option...

How to Create Fake Sales Pop-Ups on Your Shopify Store

 How to Create Fake Sales Pop-Ups on Your Shopify Store Adding sales pop-ups to your Shopify store can create a sense of urgency and social proof, encouraging potential customers to make a purchase. While it's always best to be transparent and honest with your customers, some store owners may choose to implement fake sales pop-ups to simulate recent purchases. Here's a step-by-step guide on how to create such pop-ups using custom code in your Shopify store. Step 1: Create a New Section First, you'll need to create a new section in your Shopify theme. To do this, follow these steps: Go to the Shopify Admin Dashboard . Navigate to Online Store > Themes . Click on Actions > Edit Code for the theme you want to modify. Under the Sections directory, click on Add a new section . Name the section customer-purchased . Conclusion This guide walks you through creating a fake sales pop-up on your Shopify store using a custom section. Full code ...

Create a Dynamic Video Slider with Customization Options in shopify

 In the fast-paced world of digital content, captivating your audience's attention is crucial. One effective way to engage your viewers is through dynamic video sliders, seamlessly blending visuals with interactivity. Today, we unveil a versatile solution that not only showcases your video content but also offers customization options to align with your brand's identity. Unveiling the Interface Our video slider combines sleek design with intuitive functionality. Let's dive into its key components: Background Customization: Set the stage with a background color of your choice to complement your brand's aesthetic. Engaging Heading and Text: Craft a compelling message with customizable heading and descriptive text, ensuring your audience stays informed and intrigued. Interactive Play Button: Enhance user engagement with a play button overlay, enticing viewers to interact with your video content. Navigation Arrows: Navigate through the slider effortlessly with customiza...