Re: How To Call The Code To Add Author Bio In the Blog?

How To Call The Code To Add Author Bio In the Blog?

11 0 3

Hello, I've been following this thread to understand how to add author bio on Shopify blog at the bottom of article. I have added this code {% include 'author-bio' %} in the template-article.liquid at the place I want the code to show, so that's fine.


I have created author-bio.liquid to house the following code, with the images in Assets that correspond to the names, author-one.jpg and author-two.jpg, so I think it's still fine up to this point:

<div id="author-bios">
{% if == 'Author One' %}
<img src="{{ 'author-one.jpg' | asset_url }}">
<h3>Josephine Wong</h3>
<p>A health and beauty enthusiast who is passionate about helping people to discover the best beauty trends and understand how high-performance home beauty devices can solve their facial and skincare problems naturally from the comforts of their own home. Loves following best tips, tricks and latest trends on anything and everything about anti-aging skincare.</p>

{% elsif == 'Author Two' %}
<img src="{{ 'author-two.jpg' | asset_url }}">
<h3>Aimee Lee</h3>
<p>A fun and loving person who enjoys reading up and sharing the latest beauty info with others. Likes to pull late nights quite often, but also keen to know the most effective way to maintain good, healthy skin the night-owl way.</p>
{% endif %}


My problem is, I don't know how to call the code in my blog article. What should I input in the HTML? Since there are 2 different bios, how do I specify I want say, Author One's bio to appear in my blog article? I don't have much knowledge in coding and just experimenting around to get answers, so I really don't know how to go about this. Help is much appreciated!

Replies 3 (3)

11 0 3

Ahh okay, found the solution and managed to add the bio at the bottom of the article finally with some styling. 

3 0 4

@jt_osp can you explain how you were able to solve this? I'm looking to have this done for my website.

62 1 5

What is the solution? Cause I am looking for the same issue and Shopify does not support a author page.