# Howto show the topic id in Metadata of initial Post

**URL:** <https://meta.discourse.org/t/howto-show-the-topic-id-in-metadata-of-initial-post/65567>\
**Category:** Development\
**Created:** [Julho 4, 2017, 9:37am UTC](https://meta.discourse.org/t/howto-show-the-topic-id-in-metadata-of-initial-post/65567 "2017-07-04T09:37:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [Julho 4, 2017, 4:34pm UTC](https://meta.discourse.org/t/howto-show-the-topic-id-in-metadata-of-initial-post/65567/4 "2017-07-04T16:34:17Z")

</div>

Add this to Settings \> Customize \> Common \> `</head>`:

```plaintext
<script type="text/discourse-plugin" version="0.5">
  api.decorateWidget('post-meta-data:after', dec => {
    if (dec.attrs.post_number === 1) {
      const topic = dec.getModel().get('topic');
      return dec.rawHtml(`<div class="post-info topic-id">Topic: ${topic.get('id')}</div>`);
    }
  });
</script>

```

And you get:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/e/ee0692ecd4291b35f8fa3458b7ee8870122f4dc0.png)

And you just need to add some CSS.

---

_[View the full topic](https://meta.discourse.org/t/howto-show-the-topic-id-in-metadata-of-initial-post/65567)._
