# Ícones personalizados de admin/usuário no cabeçalho

**URL:** <https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337>\
**Category:** Product Support\
**Created:** [4 Fevereiro , 2019 19:08 UTC](https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337 "2019-02-04T19:08:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [4 Fevereiro , 2019 19:26 UTC](https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337/2 "2019-02-04T19:26:04Z")

</div>

You need to update the second script:

```plaintext
<script type="text/discourse-plugin" version="0.8">
const { iconNode } = require("discourse-common/lib/icon-library");
let currentUser = api.getCurrentUser();
if (currentUser && !currentUser.admin) {
api.decorateWidget('header-icons:before', helper => {
return helper.h('li', [
    helper.h('a#home-button', {
        href:'https://Example2.com',
        title: 'Button 2'
    }, iconNode('shopping-cart')),
]);
});
}
</script>

```

You will also need to add “shopping-cart” to the site setting called “SVG sprite subset” so that the SVG for that icon can be included in your site.

---

_[View the full topic](https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337)._
