Add ability to route the New Topic button to a custom URL

AI-generated summary

nathank appreciates the Customize New Topic Button Text Theme Component but needs it to route users to a Custom Wizard instead of the default new topic page. Currently, using the Theme Component overrides the plugin’s native routing functionality because it replaces the original button. To resolve this, nathank proposes adding a new setting in the Theme Component that accepts a Custom URL — if provided, the replacement button will direct users to that URL. A pull request implementing this feature is available at https://github.com/discourse/discourse-customize-new-topic-button-text/pull/42. The solution is already in use on their site, successfully redirecting users to an Event topic creation wizard when the customized button is clicked. Screenshots show the modified button and the resulting wizard form for event details.

I really like the Customize new topic button text Theme Component, but I need it to route to a Wizard from the Custom Wizard Plugin 🧙.

I can use the native functionality of the Plugin to do the routing, but when I attempt to use this TC to change the text and icon I lose this. This is due to the way the TC hides the ‘OG’ button and replaces it with a new one.

I suggest a new setting in the TC which allows the addition of a Custom URL which, if present, directs the replacement button to the desired location. Here is a PR to that effect:

https://github.com/discourse/discourse-customize-new-topic-button-text/pull/42

I’m using it at present on our site, and it seems to be working well:

Screenshot 2025-06-11 10.45.10

When clicked, it takes you to our Event topic creation wizard:

4 Likes