# Theme-Component v Plugin: What's the difference

**URL:** https://meta.discourse.org/t/theme-component-v-plugin-whats-the-difference/153951
**Category:** Development
**Created:** [June 5, 2020, 2:56pm UTC](https://meta.discourse.org/t/theme-component-v-plugin-whats-the-difference/153951 "2020-06-05T14:56:51Z")
**Posts on this page:** 1
**Showing post:** 23

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [June 9, 2020, 9:40pm UTC](https://meta.discourse.org/t/theme-component-v-plugin-whats-the-difference/153951/23 "2020-06-09T21:40:08Z")

</div>

> [@JQ331](#):
>
> Not sure why the group owner code didn’t work for me–probably something to do with how I set up the plugin.

I can put it in a little GitHub repo when I get a chance.

> [@JQ331](#):
>
> I believe you can make an API call to `[forum-url]/groups.json` to get back all site groups, and then you can loop through from there, so no need to make multiple calls.

I don’t _think_ that gives you access to the owner data, but maybe I am missing something.

Regarding your questions:

1. The theme component I linked to does something similar to make sure the ajax call only happens on `/latest` or the homepage. I would try to build off of that idea: [discourse-featured-topics/common/head\_tag.html at ddf3d7e003423e2e5f83446a80cab78d51f09e2d · awesomerobot/discourse-featured-topics · GitHub](https://github.com/awesomerobot/discourse-featured-topics/blob/ddf3d7e003423e2e5f83446a80cab78d51f09e2d/common/head_tag.html#L12)

2. There is no built-in concept of custom group field like there is with [custom user fields](https://meta.discourse.org/t/how-to-create-and-configure-custom-user-fields/113192). I believe you would need to build a plugin that adds all the necessary bits and pieces for that to work.

---

_[View the full topic](https://meta.discourse.org/t/theme-component-v-plugin-whats-the-difference/153951)._
