# Granting Manual Badges

**URL:** https://meta.discourse.org/t/granting-manual-badges/70847
**Category:** Support
**Created:** [9월 27, 2017, 3:24오전 UTC](https://meta.discourse.org/t/granting-manual-badges/70847 "2017-09-27T03:24:33Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![jcoates](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jcoates/32/78029_2.png) [@jcoates](https://meta.discourse.org/u/jcoates)
#### Post date: [9월 28, 2017, 1:40오전 UTC](https://meta.discourse.org/t/granting-manual-badges/70847/6 "2017-09-28T01:40:12Z")

</div>

You could modify Sam’s bug reporter badge code.

> [@What is the bug reporter badge?](https://meta.discourse.org/t/what-is-this-bug-reporter-badge/17987/24):
>
> Bug Reporter SELECT distinct p.user\_id, p.created\_at granted\_at, p.id post\_id FROM badge\_posts p JOIN topics t ON t.id = p.topic\_id JOIN post\_actions pa ON pa.post\_id = p.id AND post\_action\_type\_id = ( SELECT id FROM post\_action\_types WHERE name\_key = 'like' ) AND pa.user\_id IN ( SELECT gu.user\_id FROM group\_users gu WHERE gu.group\_id = ( SELECT id FROM groups WHERE name ilike 'team' ) ) WHERE category\_id = ( SELECT…

Basically, you pick a category, and grant a badge to any user who posts a topic liked by your staff. You can then award badges as easily as hitting the like button.

You could concevably do this with a different badge for every category on your site.

---

_[View the full topic](https://meta.discourse.org/t/granting-manual-badges/70847)._
