Customise + New Topic Button

I tried customise / text / search for + New Topic, but can’t see a way to edit the + New Topic Button Text. Is it possible to edit the text on this button?

1 Like

You can Customize any text in Discourse

2 Likes

hi @JonathanCalver, welcome :wave:

the text replacement is the definitely the way to go but elements can be manipulated with css as well, especially with some extra formatting you may want to add or to align the text differently.

to add “Button” to the existing “New Topic” text:

common css

#create-topic.btn-default.btn.btn-icon-text {
     span.d-button-label:after {
     content: " Button";
     }
}

to replace the existing button text with “BUTTON”.

#create-topic.btn-default.btn.btn-icon-text {
        span.d-button-label {
        position: relative;
        visibility: hidden;
        }
        span.d-button-label:after {
        content: "BUTTON";   
        position: absolute;
        visibility: visible;
        left: 0px;
        top: 0px;   
        }
}
2 Likes

Using the built in method seems much easier.

1 Like

it should be. but i haven’t been able to change that particular button with the text replacement. not sure why :thinking:

edit: i finally got it to change with the text replacement but for some reason it wouldn’t take for awhile and i haven’t figured out why yet. anyways. it is js.topic.create.

one thing about using CSS is it allows one to be a bit more specific on some of the page elements. for example, on my site, i used CSS to change the reply button at the bottom of my topics to say “Reply to Topic”. to distinguish it from the post reply buttons. if one uses the text replacement, it will replace the text on both buttons. :slight_smile:

2 Likes

OK, thanks for this but when I go to admin / customise / text and search for New Button, it says there are more than 50 options and I should refine the search.

So, when I put in + New Button, it only comes up with one option, which is js.user_activity.no_topics_body and not the one I want.

So, can you tell me which of the 50 + options is the right one for me to edit to update the + New Topic button on the “Latest” home page, or advise how I should modify my search term? Thanks.

1 Like

the one you want is js.topic.create

search for that (or New Topic) and then edit the text that says “New Topic”

2 Likes

Brilliant. All fixed. Thank you so much.

Aha! Good point. I’m still really bad at CSS. :crying_cat_face:

1 Like

that is one thing i can do pretty well. we can trade help lol :sweat_smile:

also you solved this @pfaffman i just added some extra.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.