# (Superseded) Add a "+ New Topic" button on every page

**URL:** <https://meta.discourse.org/t/superseded-add-a-new-topic-button-on-every-page/38922>\
**Category:** Site Management\
**Tags:** how-to\
**Created:** [2016年二月2日 20:28 UTC](https://meta.discourse.org/t/superseded-add-a-new-topic-button-on-every-page/38922 "2016-02-02T20:28:28Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![dalerka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dalerka/32/120265_2.png) [@dalerka](https://meta.discourse.org/u/dalerka)\
**Post date:** [2017年十二月15日 12:50 UTC](https://meta.discourse.org/t/superseded-add-a-new-topic-button-on-every-page/38922/22 "2017-12-15T12:50:50Z")

</div>

Ooookay, this simple thing took longer to implement because the following code **does not work if put in the `</body>` section** , but does work if put in:  
Customize ➡ Edit CSS/HTML ➡`</head>`

**Result:**  
 ![Create_button](https://global.discourse-cdn.com/meta/original/3X/c/b/cb92d8a6150b26ce0b04c8499dbd14402fdd1011.jpg)

> **See code**
>
> ```plaintext
> <!--Show "Create" button in the Header (only for authenticated users) -->
> <script type="text/discourse-plugin" version="0.4">
> api.decorateWidget('header-buttons:after', helper => {
> if (Discourse.User.current()) {
> const createTopic = function() {
> const Composer = require('discourse/models/composer').default;
> const composerController = Discourse. __container__.lookup('controller:composer');
> composerController.open({ action: Composer.CREATE_TOPIC, draftKey: Composer.DRAFT });
> }
> return helper.h('button#create-new', {
> className: "btn fa fa-plus",
> title: "Create",
> onclick: createTopic
> }, '' ); // ''-this is 'text' for the button, change as needed.
> }
> });
> </script>
> <style>
> /* Hide the original "+ New Topic" button */
> button#create-topic { 
> display: none;
> }
> /* Larger "Create" button on Desktop */
> button#create-new {
> font-size: x-large;
> height: 39px;
> width: 39px;
> padding: 0;
> color: white;
> border-radius: 50px;
> border: 3px solid white;
> }
> button#create-new:hover {
> border: none;
> }
> /* Smaller "Create" button on Mobile */
> html.mobile-view.mobile-device button#create-new {
> height: 32px;
> width: 32px;
> margin: 3px;
> }
> </style>
> 
> ```

If someone has a better way, please let me know! Otherwise, style as you wish and enjoy 😉

---

_[View the full topic](https://meta.discourse.org/t/superseded-add-a-new-topic-button-on-every-page/38922)._
