# Custom meta fields in posts

**URL:** <https://forum.ghost.org/t/custom-meta-fields-in-posts/16887>\
**Category:** Themes\
**Created:** [September 3, 2020, 9:38am UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887 "2020-09-03T09:38:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![woubuc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/woubuc/32/9525_2.png) [@woubuc](https://forum.ghost.org/u/woubuc)\
**Post date:** [September 3, 2020, 9:38am UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/1 "2020-09-03T09:38:02Z")

</div>

I’m trying to port my current blog over to Ghost. One of the features I have on my blog right now is the option to add a custom hex colour code to my post, which is then used in a custom `<style>` tag on the Post page.

Is it possible to do something like this with Ghost? I don’t need any fancy editor features like a colour picker, just a key/value input that I can use in my handlebars templates.

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [September 3, 2020, 11:27am UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/2 "2020-09-03T11:27:26Z")

</div>

Ghost doesn’t have custom fields in the same way, but it does have a codeinjection\_head and foot block as well as an HTML card - so you can include your custom styles into any of those.

I’ve migrated sites in the past that did exactly what you describe, and we just put the `<style>` block directly into codeinjection\_head. It works the same but without a specific UI 🙂

---

<div class="post-metadata">

**Author:** ![jeff](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jeff/32/4900_2.png) [@jeff](https://forum.ghost.org/u/jeff)\
**Post date:** [September 4, 2020, 5:58am UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/3 "2020-09-04T05:58:56Z")

</div>

Weirdly, the TAG pages do let you set an `accent_color` in hex - But I haven’t found it used anywhere in Casper… maybe it’s historic

---

<div class="post-metadata">

**Author:** ![woubuc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/woubuc/32/9525_2.png) [@woubuc](https://forum.ghost.org/u/woubuc)\
**Post date:** [September 4, 2020, 1:22pm UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/4 "2020-09-04T13:22:38Z")

</div>

Yup, tags have an accent colour and I use those colours in my theme. But posts don’t.

I solved it by calling a JS function with the post colour in the codeinjection block (because it needs to apply a bunch of styles and calculate the proper values based on the given colour). Still, this seems like something that should be applied on the backend rather than the frontend.

---

<div class="post-metadata">

**Author:** ![Vitalie\_Jalbu](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vitalie_jalbu/32/24048_2.png) [@Vitalie\_Jalbu](https://forum.ghost.org/u/Vitalie_Jalbu)\
**Post date:** [August 31, 2023, 5:51pm UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/5 "2023-08-31T17:51:11Z")

</div>

Hi guys, I’d also need custom fileds, liek shopify, can we all request this feature to the ghost team? Thanks.

 ![CNuG5eaXrv0CEAE=](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/c/b/cb1f6e803a3ad9665a03f32597ea345b90ed9ca3.png)

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [August 31, 2023, 6:37pm UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/6 "2023-08-31T18:37:56Z")

</div>

Ghost doesn’t have custom fields. If you want to request it, there’s an ‘Ideas’ category for that. :) I can’t move your post, but feel free to start a new one there, explaining what you want custom fields for.

I’m not the Ghost dev team, but I generally think that being really focused on blogging and newsletters is a strength of Ghost. The data model is absolutely intended for blogs/newsletters, not other types of content like products (your example). Custom fields would definitely be useful, but they might also be a distraction from the core mission of being an awesome blogging and newsletter platform. If you really need custom fields and can’t figure out a workaround\*, you might want to consider a different platform.

- Tags can be a good way to add some extra organizational content to your posts, but without knowing what you’re trying to accomplish, I’m not sure if that’s a good fit for you or not!

---

<div class="post-metadata">

**Author:** ![Vitalie\_Jalbu](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vitalie_jalbu/32/24048_2.png) [@Vitalie\_Jalbu](https://forum.ghost.org/u/Vitalie_Jalbu)\
**Post date:** [September 1, 2023, 6:54am UTC](https://forum.ghost.org/t/custom-meta-fields-in-posts/16887/7 "2023-09-01T06:54:55Z")

</div>

For example I only need comments, likes and authors follows. I can do it separately inside the db ant then create custom controllers to CRUD these data. But problem is, how I can attach to main post object one of these data? How to extend the post object?  
ANother solution may be using apis, so basically creating small components that fetches api, but don’t thik is a good idea because too many requests.

Anyone ever did something like this?
