Skip to content

Instantly share code, notes, and snippets.

@carbone
Created March 3, 2021 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carbone/1b7fbb9c35062b2798d2be90100b1d1a to your computer and use it in GitHub Desktop.
Save carbone/1b7fbb9c35062b2798d2be90100b1d1a to your computer and use it in GitHub Desktop.
{% if article.metafields.custom_fields["author"] != blank %}
{% assign id = article.metafields.custom_fields.author%}
{% for author in shop.metafields.custom_fields.authors %}
{% if author.identifier == id %}
<div class="custom-field custom-field__author custom-field__type--text-list">
<strong style="font-size: large">Meet {{ author.name }}</strong><br /><br />
{% if author.photo != blank %}
<div class="custom-field--value" style="float: left; margin-right: 15px;">
{% render 'cf-image' with image: author.photo, size: "150x100", crop: "center", format: 'pjpg', tag_class: "author-photo" %}
</div
{% endif %}
<div class="custom-field--value">
{{ author.bio }}
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
<br />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment