# Javascript added to theme header returns $ is not defined

**URL:** https://meta.discourse.org/t/javascript-added-to-theme-header-returns-is-not-defined/371370
**Category:** Development
**Created:** [June 23, 2025, 5:26pm UTC](https://meta.discourse.org/t/javascript-added-to-theme-header-returns-is-not-defined/371370 "2025-06-23T17:26:36Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![opcourdis](https://avatars.discourse-cdn.com/v4/letter/o/45deac/32.png) [@opcourdis](https://meta.discourse.org/u/opcourdis)
#### Post date: [June 24, 2025, 6:58pm UTC](https://meta.discourse.org/t/javascript-added-to-theme-header-returns-is-not-defined/371370/5 "2025-06-24T18:58:42Z")

</div>

Allright, I understand now, coming from wordpress/joomla developement, you think adding js to the header would work in the same way.

Your link provides indeed a solution, note that now the `<script type='text/discourse-plugin>` headers are deprecated [Modernizing inline script tags for templates & JS API](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482)

To quickly solve the url situation I ended up doing a permalink directly from discourse admin though.

Thank you for the support and explanation !

---

_[View the full topic](https://meta.discourse.org/t/javascript-added-to-theme-header-returns-is-not-defined/371370)._
