Add a metada to the blog author

Add a metada to the blog author

j_adv21
Shopify Partner
14 0 1

Hi,

 

I wanted to add a metadata to the blog author (since I wanted to add a section to each blog to display the Author's bio) but I can't see the Author in the Custom Data? Where should I add it?

 

author_metadata.png

Replies 4 (4)

ProtoMan44
Shopify Partner
633 55 97

@j_adv21 hey, thanks for posting here.
i think best way to show a a section .

creat custom sections then put unter the autor condition: 
{% if article.author %}
<--! section -->
{% endif %}


OR create metadata then attach the bolgs metafields then use on custom section.

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!

tim
Shopify Partner
3911 395 1439

In a theme, article.author is a string, not an object, so you can't add metafields to it.

I'd probably consider creating metaobjects for each author and then you can add a metafield to article to reference these metaobjects and use metaobject fields as dynamic sources.

Screenshot 2024-06-29 at 4.24.53 PM.png

Screenshot 2024-06-29 at 4.30.24 PM.pngScreenshot 2024-06-29 at 4.30.45 PM.png

 

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
j_adv21
Shopify Partner
14 0 1

Yes, I was thinking of the same solution but I couldn't find the Author Metadata in the Custom Data

tim
Shopify Partner
3911 395 1439

...consider creating metaobjects for each author...

Screenshot 2024-07-03 at 6.55.11 PM.pngScreenshot 2024-07-03 at 6.55.41 PM.png

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com