# How do I make changes using api.modifyClass?

**URL:** https://meta.discourse.org/t/how-do-i-make-changes-using-api-modifyclass/276205
**Category:** Development
**Created:** [August 22, 2023, 3:44pm UTC](https://meta.discourse.org/t/how-do-i-make-changes-using-api-modifyclass/276205 "2023-08-22T15:44:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![noel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/noel/32/266932_2.png) [@noel](https://meta.discourse.org/u/noel)
#### Post date: [August 22, 2023, 3:44pm UTC](https://meta.discourse.org/t/how-do-i-make-changes-using-api-modifyclass/276205/1 "2023-08-22T15:44:39Z")

</div>

I’m trying to do something like [this](https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403) and have my dev environment, but i’m not familiar how to go about this?

Do i use this to create a new plugin for my site? or is it embedded into one of the files?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 22, 2023, 6:09pm UTC](https://meta.discourse.org/t/how-do-i-make-changes-using-api-modifyclass/276205/2 "2023-08-22T18:09:17Z")

</div>

You don’t need to create a plugin for that anymore. You can do it in a theme component.

Maybe this will help: [https://github.com/pfaffman/discourse-custom-homepage-for-groups/blob/main/javascripts/discourse/initializers/custom-homepage-set.js.es6](https://github.com/pfaffman/discourse-custom-homepage-for-groups/blob/main/javascripts/discourse/initializers/custom-homepage-set.js.es6)

---

<div class="post-metadata">

### Author: ![noel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/noel/32/266932_2.png) [@noel](https://meta.discourse.org/u/noel)
#### Post date: [September 9, 2023, 5:54am UTC](https://meta.discourse.org/t/how-do-i-make-changes-using-api-modifyclass/276205/3 "2023-09-09T05:54:46Z")

</div>

Thanks Jay! Have been trying this for days.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 9, 2023, 5:54am UTC](https://meta.discourse.org/t/how-do-i-make-changes-using-api-modifyclass/276205/4 "2023-10-09T05:54:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
