Is it possible to add metafields for blog post / article?

scom
Excursionist
39 0 47

I am trying to understand how its possible to use metafields with blog posts. I see how to achieve this with products and the online documentation implies that metafields can be added to blog posts (or even any page) but when trying to add metafields, there is no specific option for blog posts.....

 

20220302110959.png

Can someone point me in the right direction for this?

Thanks

Replies 37 (37)

nishanttbi
Explorer
68 2 6

Metafields make it possible to store additional information for articles, blogs, collections, customers, orders, pages, products, the shop, and variants. You can access the metafield object through the metafields attribute of these resources.

Want to modify or custom changes on store hire me.
Email: info@brihaspatitech.com
If helpful then please Like and Accept the Solution.
scom
Excursionist
39 0 47

Thanks for the fast reply ..... not sure if it's a copy and paste response because its exactly the kind of verbiage I have been reading everywhere but with ZERO explanation as to how this is done. I can't find a single example or guide on how to create metafields for blog articles or how to then populate them when creating a new blog post.

 

Adding it to products is self explanatory and is easy to find, but how to I do this for a blog article? 

 

Some tutorial or actual steps that need to be taken would be really appreciated.

nishanttbi
Explorer
68 2 6

I hope this will help you out. Show Blog Article meta field in your Article page needs to insert the below code in the article.liquid file. Article file path: Login into Admin panel-> left side menu selects Online store -> select Themes. Now left sidebar loads with the file list. Check at Sections bottom of the list “article.liquid” file, click on it. Insert below code where you want to show the meta field at this position in the file and save it. {% include 'all-in-one-metafields', metafields: 'article' %}

.

metafield.png

Want to modify or custom changes on store hire me.
Email: info@brihaspatitech.com
If helpful then please Like and Accept the Solution.
agarric
Shopify Partner
7 0 12

@nishanttbi , unfortunately, this is also not helpful. We're asking how to create new metafields on blog posts, not how to output them. That being said, I do see that the code you suggested includes the words "all-in-one-metafields", which I see is a Shopify app after doing a quick Google search. The information you included would have been relevant if you gave us the first steps required in the process, which is to download that app...

@scom I haven't found a way to add metafields to a blog post natively, like you can for products or variants, even though Shopify's documentation says that you can. That being said, I and other developers have used a metafields Shopify app to achieve the desired functionality. This is similar to how ACF works on Wordpress sites. I would suggest the Accentuate Custom Fields app, although there's many apps that work great. Those apps should provide documentation on how to add and output metafields. Fingers crossed that Shopify adds native Blog post metafields to their list soon!


scom
Excursionist
39 0 47

@agarric good to know I am not alone 🙂 thanks for taking the time to share that, I had already come across apps that add metafield functionality but assumed that with 2.0, they would no longer be needed Shopify made the effort to address this critically missing feature. Seems odd that they would add it for products and not blogs, this really does limit what Shopify can do out of the box.

To be honest, whilst I do overall like Shopify, I feel the business model is to intentionally limit functionality so they can make revenue off the apps. There really some insanely basic functions missing that surprise surprise have numerous PAID apps waiting to solve.

Anyway, sorry, didn't mean for this to turn into a rant, appreciate your suggestion, I will look into the option of using an app and hope that somewhere in the future, Shopify considers that having rich content on a commerce site is important enough to add some useful tools for creating proper blog content.

agarric
Shopify Partner
7 0 12

 I wonder if the original question was even completely read. This answer was related, but ultimately not helpful.

scom
Excursionist
39 0 47

I have honestly spent the last week trying to find any way to add metafields to blogs. I am trying to move away from Wordpress and whilst shopify is a great platform for sales, it seems to be terrible for content. Our current site has many articles and I really want to be able to use metafields to make the blog post more relevant. For example, if a post is about a product, then I should be able to define that with a metafield and show that product at the end of the post.

This seems pretty obvious in terms of functionality but I cant find any way to implement this.

Michelle_1014
Shopify Partner
1 0 3

OMG I have exactly the same struggle here! we have 5 websites, each more than 100 articles, currently migrating from Wordpress to Shopify. I am stuck now...no idea how to tackle this to enable rich content on the new website. 

scom
Excursionist
39 0 47

Hi @Michelle_1014 I am also still figuring out how to solve this ... my progress so far ...

 

1. pay a dev to build the functionality i need

2. use some of the paid apps that enhance content, think of elementor but for shopify

3. wait for shopify to care

 

option 2 is probably going to be my way forward but still evaluating which plugin to use. I also purchased a theme and the developer of that says there are working on a content platform too, so I might just wait to them as it does look promising. 

naesmac
Tourist
8 0 2

I am experimenting with Bloggle. Seems to be promising. Still wish Shopify would build a complete system versus a partial solution with 3rd party stop-gap (money-making) apps. Current 2023 blogging on this platform is worse than 1998 tech. 

Boots
Shopify Partner
30 0 40

I've gone on at length in this community about how Shopify is so talented at adding amazing new features, but only building them halfway.  Metafields is just one example of that.  They've been around for years, but only in the last year or so have they finally integrated them into the admin of the site.  Until now, you either had to use 3rd-party apps, browser extensions, or raw code to add/edit/delete metafields.  Now, you can finally manage them within the admin, but as it goes with most things Shopify, they only went halfway with it.  You can add metafields to Pages, Blogs, and Articles, but for some reason, they've not added those options to the Metafields settings in Shopify.  Makes NO sense.

 

If you just need basic custom fields added to your Blog and Articles, you might try the Poshify browser extension for Firefox and Chrome.  It adds a button to the browser toolbar, so when you are on a page/product/collection you want to add metafields to in the admin, you can click it and add/edit/remove metafields to that item.

 

Boots_0-1647374871376.jpeg

 

You set a "namespace" (basically a category or group of metafields), then a "key" (a label) and a "value".  Then you can access it in your templates using (for an article):

{{ article.namespace.key }}

 

That will render the value for the metafield in your article.  This is very low-tech and maybe a little more raw than a lot of people want to handle.

 

The other option is to go with an app to manage your metafields.  The best one I've used so far has been Power Editor.  You'll most-likely need a developer to handle the rendering in the templates - it can get a bit complex - but the GUI for editing the fields is pretty good.  At least "pretty good" for Shopify standards.  App interfaces are extremely restricted in Shopify, so they have to do the best they can.  The app is relatively old, and I see that it doesn't show up in the app store search anymore, so it's possible they are phasing it out.  I'm still using it with my site, though, and it's working well.

 

Anyway, I hope that helps.  I definitely share in your frustration with Shopify Metafields.  It's a much-needed resource that has been so miserably developed by Shopify over several years.  I don't get it.  ¯\_(ツ)_/¯ 

scom
Excursionist
39 0 47

@Boots big thank you for taking the time to reply and with some background and understanding of my question. Not much I can add to what you said, I think its summed up well, can't understand the approach of Shopify for leaving out so many features that are basic on other platforms but will give the workaround you suggested a go. At least I have a direction now for how to implement this and when I eventually get stuck, have some new keywords to start googling 😛

Boots
Shopify Partner
30 0 40

@scomGlad I could help!  I do want to mention that I think @agarric's recommendation of Accentuate Custom Fields is probably the way to go, if you decide to go the app route.  I had never seen it before today, but after checking it out, I've decided I'm switching over from Power Editor.  ACF seems to be a MUCH more robust metafields manager than I've seen elsewhere. 

scom
Excursionist
39 0 47

Noted, will check out Accentuate Custom Frields, was just hoping to avoid more apps, more cost and the potential of something becoming redundant (after committing to it) .... just seemed like a very basic thing that should have been implemented .... oh well, thanks anyway

priyav
Tourist
4 0 3

@Boots Thank you so much for this solution, was looking for it for a long time and you saved me!!!

Just one suggestion, I used this to add keywords to my blogs. I struggled a bit to get the keywords reflected on my blogs as I missed updating "theme.liquid" file with the newly created field. But once I added the relevant code, it worked!!!

 

Boots
Shopify Partner
30 0 40

@priyavGlad I could help!  🙌

francoiscote
Shopify Partner
3 0 8

This is probably too late for you, but it seems that metafields are now (May 2022) supported natively for Pages, Blogs and Blog Posts. I searched everywhere for an official release note or announcement for this and could not find anything. Screen Shot 2022-05-13 at 15.53.26.jpg

 

 

 

Boots
Shopify Partner
30 0 40

Wow!  That's great news.  Thanks for the heads up!  🙌

scom
Excursionist
39 0 47

Thanks for the info, you are right, its been enabled now :), was hoping for this, I've been holding out because i didn't want to use a 3rd party app for something which seemed like it should be native, now we just need some documentation on how to use it 😛

priyav
Tourist
4 0 3

wow, thats great... thanks for sharing this @francoiscote 

francoiscote
Shopify Partner
3 0 8

As a Staff collaborator with limited permissions on my client's store, I had permission problems when trying to add metafields to Pages, Blogs or Blog Posts.

 

After a few tests, enabling the "Discount" permissions on my account fixed that problem for me. It doesn't make much sense and it is probably a bug, but I am sharing here in case someone faces the same issue.

francoiscote
Shopify Partner
3 0 8

btw, I reported the bug and Shopify was able to reproduce it. So I guess this will be fixed at some point.

Danh11
Shopify Partner
83 2 35

Just incase anyone gets tripped up with accessing metafields when creating blog posts, I found that you're not able to access metafields when creating the post. You have to save the post and then you're able to add values to the metafields. By default the post will be hidden (as in not live), allowing you to modify metafields before you publish.

GRAYBOX
Shopify Partner
1 0 2

Thanks for the insight @Danh11 , while I've added Blog metafields successfully I'm not able to see the created fields or add values to the metafields when creating a new post or editing an existing one. A quick follow-up question related to a comment on this thread: what is your user's role or permission set?

 

For clarity and replication of a successful implementation, could you please confirm if you followed these steps:

  1. Adding metafield definition in /admin/metafields/blog/
  2. Heading to /admin/articles/ and creating a new blog post, save
  3. Edit same blog post and add values to the metafields

Thank you for your time.

AmyC78
Tourist
3 0 6

Hello. I'm not sure if you're talking to me, Graybox. But, yes. I have added the "product" metafield in the admin section under blog posts. I have created a blog post & saved it. I have edited that same post and added a value to the metafield. Also, I am the owner of the store, so it shouldn't have anything to do with permissions. I am just unable to find anywhere in the "article" template to use dynamic content and insert my metafield into the template.

iPedro
Excursionist
16 0 20

Amy, I have found a solution, but it involves coding. I’ve been learning quite a bit about metafields and liquid in order to take full advantage of these capabilities but it’s not non-tech friendly. Shopify has yet to provide an easy click and drag output method. Or maybe they’re waiting for theme designers to do that. 

I still haven’t built the code because I want to learn more but it involves using a custom liquid block in your theme editor where you can write your code that outputs the values of product metafields. It’s fairly easy with one product but much more complex code wise with multiple products. Once I write the code, I’ll drop it here but if you’re in a hurry, I’d suggest reaching out to your developer if you have one. 

scom
Excursionist
39 0 47

This is kind of the wall that I run into with everything on Shopify, find a dev or add an app, that seems to be the only way to go beyond the built-in functionality which is great as long as you only want a very basic cookie cutter store. Considering how important articles and content are for SEO I am really surprised how underdeveloped this is in Shopify and it has made me consider switching to woocomerece more than once. 

 

Other than adding more apps or getting a developer to modify your theme (something I am reluctant to do because you are then stuck with that theme and updates to the theme can break the mods) , is there are 'simple' way to achieve this or some detailed tutorial anywhere?

iPedro
Excursionist
16 0 20

Not a simple way to use metafields but I thought of a workaround which I’ve used extensively on our store. This is only practical if you have a small selection of products. 

I created one blog post template for each product and added a featured product block at the end. After writing a blog post, I simply select the template for that product and voila, I have an easy way for readers to add the item featured in the blog post to their cart. 

The reason I’d like to use metafields is because we often feature multiple products in a blog post and it wouldn’t be practical to have templates for every variation and combination. Metafields has the answer to this problem but falls just short because there’s no drag and drop way to output the value of a products metafield into a blog template. 🤷🏼‍

iPedro
Excursionist
16 0 20

I see the ability to add a Product Metafield type under metafields> blogs and can now see it in a blog post, but I don't see a place to add a dynamic product for a blog post template in Theme Editor.  As you can see, there's no dynamic field available next to Select Product🤷🏼‍

Is there anything other than Featured Product? Ultimately, I'd like to do a Shop this article carousel or at least a single product at the end of a blog post.

 

Screen Shot 2022-07-03 at 1.16.54 PM Large.jpeg

AmyC78
Tourist
3 0 6

@iPedro Did you ever figure this out? I'm having the same problem.

priyav
Tourist
4 0 3
Yes, we the upgrade in Shopify that happened in May, we can add Metafields to Blogs. The same way we add for products. In Settings -> Metafields, you can now see the option to add metafield in blogpost.
AmyC78
Tourist
3 0 6

Hi @priyav Thanks for the response. I see how to add metafields, but, like iPedro, I am not seeing how to output them in my article template. I am also trying to display a related product, and I've set everything up in metafields as well as on my article. But, there is not a dynamic section to output it on the article. Do you have any insight on that? Thanks!

 

Antje_WILDHOOD
Tourist
7 0 2

Hey, we are having the same problem....still!!

I will work with the workaround of using different blogpost templates for now but would appreciate a meta field solution soon. So if anything came up with a solution that does not include a third party app or hiring a developer I would be very happy.

Antje_WILDHOOD
Tourist
7 0 2

Thanks! I will look into it. I am not sure if I understand everything but it will be worth a try.

WatsonPack
Tourist
5 0 1

It really just seems like unfinished work from Shopify. Why have metafields enabled for Blog / Posts but no dynamic content output on the Blog front end? I think it's just not ready yet. Seems weird to have shipped only half of the feature tho. Patiently waiting like everyone else in this thread!

_realityengine
Shopify Partner
22 0 5

Same here - still no dice on this. I've added two custom metafields to use with blog posts.

Creating the metafields was easy enough - but when creating or editing a blog posts, those metafields are not shown anywhere or made available for us to edit. I was expecting them to appear below the post editor, just as they appear below product info in the product editor - but, nothing. 

Where do we edit the metafield values for the blog posts?

Currently chatting with a Support Advisor - hopefully they have some actual, practical, useful info that doesn't involve paying for yet another bolt-on.

EDIT: Okay, after a helpful video from the Support Advisor, it turns out the custom metafields I created were attached to the actual Blog, rather than the Blog Posts/Articles. On further scrutiny, I see there is a Blog Posts object to which we can create metafields.

 

_realityengine_2-1712377971811.png

 

_realityengine_3-1712378028934.png

 

After creating a custom metafield for the corret object, I now have access to these fields in the editor itself - a box appears below the post where I can click into the metafields and use them as expected.

_realityengine_0-1712377835709.png

 

_realityengine_1-1712377869975.png

 

Hope this is of help for anyone else who couldn't see the forest for the trees!

 

#epicfacepalm

_realityengine_7-1712378485667.png

 

 

// realityengine.design