File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ This is a list of useful Shopify Snippets that I often reference while developin
8
8
* [ Add Original Price of Discounted products on Cart Page] ( #add-original-price-of-discounted-products-on-cart-page )
9
9
* [ Add On Sale Badge on Products Based on Price] ( #add-on-sale-badge-on-products-based-on-price )
10
10
* [ Back or Continue Shopping link on Cart] ( #back-or-continue-shopping-link-on-cart )
11
+ * [ Blog Category Filter Dropdown] ( #blog-category-filter-dropdown )
11
12
* [ Calculate Discount on Products] ( #calculate-discount-on-products )
12
13
* [ Call a Product on any page] ( #call-a-product-on-any-page )
13
14
* [ Custom Pagination] ( #custom-pagination )
@@ -74,6 +75,18 @@ Inset the following code inside items loop in cart template.
74
75
<a href =" {{ cart.items.first.product.collections.first.url }}" title =" Continue Shopping" >Continue Shopping</a >
75
76
```
76
77
78
+ ## Blog Category Filter Dropdown
79
+ ``` html
80
+ {% if blog.tags.size > 0 %}
81
+ <select id =" BlogTagFilter" >
82
+ <option value =" /blogs/{{ blog.handle }}" >{{ 'blogs.article.all_topics' | t }}</option >
83
+ {% for tag in blog.all_tags %}
84
+ <option value =" /blogs/{{ blog.handle }}/tagged/{{ tag | handleize }}" {% if current_tags contains tag %}selected{% endif %} >{{ tag }}</option >
85
+ {% endfor %}
86
+ </select >
87
+ {% endif %}
88
+ ```
89
+
77
90
## Calculate Discount on Products
78
91
``` html
79
92
{% capture discount %}
You can’t perform that action at this time.
0 commit comments