# Set Theme Dynamically

**URL:** <https://meta.discourse.org/t/set-theme-dynamically/250719>\
**Category:** Development\
**Created:** [January 4, 2023, 3:51pm UTC](https://meta.discourse.org/t/set-theme-dynamically/250719 "2023-01-04T15:51:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [January 4, 2023, 6:14pm UTC](https://meta.discourse.org/t/set-theme-dynamically/250719/2 "2023-01-04T18:14:02Z")

</div>

Interesting question.

Just a guess. I suppose you can create a script that will use Discourse’s API doing a PUT request on `https://yourdiscourse.com/admin/themes/[id_theme]` with the body `{"theme":{"enabled":false}}` (false to disable or true to enable).

I may try tonight.

---

_[View the full topic](https://meta.discourse.org/t/set-theme-dynamically/250719)._
