Blog Filter & Articles Search

Elevate your Shopify store's blog experience with our tailored Blog Filter & Articles Search customization, designed to enhance content discoverability without the need for external apps.

Blog Filter & Articles Search
1 sections

Blog Filter

We will guide you on how to create the Blog filter by Article tag

  • Step 1
  • From Shopify Admin Dashboard > Online Store > Themes > ... button > Edit code

  • Step 2
  • Search or Scroll the file list on the left to find the file name "main-blog.liquid" within Snippets. (Depending on your store's theme, it will have different files. We will guide based on Dawn theme structure) .

  • Step 3
  • Add the code below to the line#24

    {% if blog.tags.size > 0 %}
          <div class="blog-filter">
            <div class="list-group">
              <ul id="BlogTagFilter" class="tag-list">
                <li>Filter by:</li>
              <li>
                <a href="{{ blog.url }}" class="button">
                  {{ 'All Topics' }}
                </a>
              </li>
                {% for tag in blog.all_tags %}
                <li>
                  <a href="{{ blog.url }}/tagged/{{ tag | handleize }}" class="button">
                  {{ tag }}
                  </a>
                </li>
                {% endfor %}
              </ul>
            </div>
          </div>
        {% endif %}

  • Step 4
  • Also you can add CSS style, it's additional

    <style>
      .list-group {
        text-align: center;
      }
      ul#BlogTagFilter {
    	list-style: none;
    	padding-top: 10px;
    	}
      ul#BlogTagFilter li {
    	display: inline;
        margin: 5px;
    	}
    </style>

    Idea from "00Sarah00"

    Using below code

    <form method="get" action="/search">
        <input type="hidden" name="type" value="article" />
        <input type="text" name="q" />
        <input  type="submit" value="Search" />
    </form>
    Tags

    Related Articles

    Boost Sales Today: The Simple Power of Free Shipping Thresholds for Shopify Stores
    Tips & Tricks

    Boost Sales Today: The Simple Power of Free Shipping Thresholds for Shopify Stores

    Discover how implementing a strategic free shipping threshold can dramatically increase your Shopify store's conversion rates and average order value. Learn quick, actionable steps for both merchants and developers to set up and optimize this powerful tactic within a single day.

    May 16, 20266 min
    Boost Conversions: How to Add a Countdown Timer to Your Shopify Store
    Tips & Tricks

    Boost Conversions: How to Add a Countdown Timer to Your Shopify Store

    Learn how to add an urgency-driving countdown timer to your Shopify product pages and sales promotions. This tutorial covers methods from theme editor blocks to custom Liquid code and when to choose a dedicated app, helping you drive conversions.

    May 14, 20268 min
    Convert a Shopify Section to a Block (Horizon Theme version)
    Tips & Tricks

    Convert a Shopify Section to a Block (Horizon Theme version)

    In Horizon, Shopify allows developers to convert standalone sections into reusable blocks, giving merchants even more control in the theme editor. Let’s walk through the process step by step.

    May 10, 20267 min
    How to Add Tailwind CSS to Shopify
    Tips & Tricks

    How to Add Tailwind CSS to Shopify

    Learn how to add Tailwind CSS to Shopify for faster, responsive design. Enhance your store’s look with clean, utility-first styling. Perfect for theme customization

    May 10, 202615 min