# Code inside Content Posts not working

**URL:** <https://discourse.gohugo.io/t/code-inside-content-posts-not-working/44855>\
**Category:** support\
**Created:** [June 18, 2023, 6:50am UTC](https://discourse.gohugo.io/t/code-inside-content-posts-not-working/44855 "2023-06-18T06:50:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![frjo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/frjo/32/18626_2.png) [@frjo](https://discourse.gohugo.io/u/frjo)\
**Post date:** [June 18, 2023, 8:22am UTC](https://discourse.gohugo.io/t/code-inside-content-posts-not-working/44855/2 "2023-06-18T08:22:09Z")

</div>

Go template code can not be added in content files. Only in template files.

Look in to Hugo shortcodes and you find the solution for this.

> **[Shortcodes](https://gohugo.io/content-management/shortcodes/)**
>
> Shortcodes are simple snippets inside your content files calling built-in or custom templates.

---

_[View the full topic](https://discourse.gohugo.io/t/code-inside-content-posts-not-working/44855)._
