Last active
March 31, 2023 17:35
-
-
Save kmeister2000/4f440b1bc9e35a81acbb3e632574fd7d to your computer and use it in GitHub Desktop.
Shopify - get the blog category for every article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} By Stefan Bowerman and Gina Gregory {% endcomment %} | |
{% comment %} Shopify doesn't have a way to access article.blog directly so we have to parse out the url {% endcomment %} | |
{% assign blogHandle = article.handle | split: '/' | first %} | |
{% comment %}Access the blog object {% endcomment %} | |
{% blog = blogs[blog_handle] %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment