# Ability to place custom fields in post header?

**URL:** https://meta.discourse.org/t/ability-to-place-custom-fields-in-post-header/106928
**Category:** Support
**Created:** [January 18, 2019, 4:43pm UTC](https://meta.discourse.org/t/ability-to-place-custom-fields-in-post-header/106928 "2019-01-18T16:43:16Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![MarkDoerr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markdoerr/32/549630_2.png) [@MarkDoerr](https://meta.discourse.org/u/MarkDoerr)
#### Post date: [March 10, 2026, 8:16pm UTC](https://meta.discourse.org/t/ability-to-place-custom-fields-in-post-header/106928/7 "2026-03-10T20:16:40Z")

</div>

You’re correct that this code is now outdated because we replaced the widget system. Here’s some information about that from last year: [Upcoming post stream changes - How to prepare themes and plugins](https://meta.discourse.org/t/upcoming-post-stream-changes-how-to-prepare-themes-and-plugins/372063) .

It is still possible to get this to work, but you’ll have to use a Glimmer Component. It could look something like this:

```plaintext
import Component from "@glimmer/component";
import { apiInitializer } from "discourse/lib/api";

class UserFieldBadge extends Component {
  static shouldRender(args) {
    return !!args.post?.user_custom_fields?.user_field_4;
  }

  <template>
    <span class="poster-user-field">
      {{@post.user_custom_fields.user_field_4}}
    </span>
  </template>
}

export default apiInitializer((api) => {
  api.renderAfterWrapperOutlet("post-meta-data-poster-name", UserFieldBadge);
}); 

```

Remember that you’ll need to match `user_field_4` in this code to the actual field you want to show.

I’ll leave it to others to modify this so that it can show ALL the `public user custom fields`. 😉

---

_[View the full topic](https://meta.discourse.org/t/ability-to-place-custom-fields-in-post-header/106928)._
