# Problem adding to post admin menu via plugin

**URL:** https://meta.discourse.org/t/problem-adding-to-post-admin-menu-via-plugin/154913
**Category:** Development
**Created:** [June 15, 2020, 6:15pm UTC](https://meta.discourse.org/t/problem-adding-to-post-admin-menu-via-plugin/154913 "2020-06-15T18:15:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [June 15, 2020, 6:15pm UTC](https://meta.discourse.org/t/problem-adding-to-post-admin-menu-via-plugin/154913/1 "2020-06-15T18:15:43Z")

</div>

I am stuck trying to update my plugin ( [Bump Reset plugin - Annotated to help new devs](https://meta.discourse.org/t/bump-reset-plugin-annotated-to-help-new-devs/57097) ) to look right in the current version of Discourse.

The source file in question is here:

- [discourse-reset-bump/assets/javascripts/discourse/initializers/discourse-reset-bump.js.es6 at master · LeoDavidson/discourse-reset-bump · GitHub](https://github.com/LeoDavidson/discourse-reset-bump/blob/master/assets/javascripts/discourse/initializers/discourse-reset-bump.js.es6)

That the way it adds to the _post admin menu_ is:

```javascript
api.decorateWidget('post-admin-menu:after', resetBumpButtonDecorateCallback);

```

Where `resetBumpButtonDecorateCallback` defines the button attributes and then calls `dec.attach`.

This used to look correct, but now looks wrong.

The new button gets added as a `<li>...</li>` _outside_ of the menu’s `<ul>...</ul>`:

 ![PostAdminMenu1](https://global.discourse-cdn.com/meta/original/3X/7/7/77d73a1687d6e15c3e1460da2e478a0af3a27bfa.png)

 ![PostAdminMenu2](https://global.discourse-cdn.com/meta/original/3X/8/b/8b51d23898d671178e76eb4ac1e2853873e8443c.png)

The button functions OK when clicked, but obviously doesn’t look right.

Am I doing things the correct way, or is there a newer/better method for doing this?

Is there a way I can change my code so it adds the item inside the list instead of after it?

Many thanks for your time!
