# 更改注册 CTA 链接

**URL:** <https://meta.discourse.org/t/change-link-signup-cta/81649>\
**Category:** Support\
**Created:** [2018年二月27日 11:44 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649 "2018-02-27T11:44:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francois\_Douville](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/francois_douville/32/94221_2.png) [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Post date:** [2018年二月27日 11:44 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/1 "2018-02-27T11:44:04Z")

</div>

How can I change the link of the signup CTA? Because I have SSO active and it currently does like a “sign in” button instead of a “sign up”. So I want to change the link with my real sign up link of Memberful.

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [2018年二月27日 13:49 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/2 "2018-02-27T13:49:30Z")

</div>

**There might be more efficient ways to do this**

but.. one is to modify the template.

The template lives at:

> <https://github.com/discourse/discourse/blob/081959227de72c7473d36618bb02ddea3e42ebcd/app/assets/javascripts/discourse/templates/components/signup-cta.hbs>

And to override it you can change

```plaintext
{{d-button action="showCreateAccount" label="signup_cta.sign_up" icon="check" class="btn-primary"}}

```

To something like:

```plaintext
<a href="https://foo.bar" target="_blank">Sign up</a>

```

In the following:

```plaintext
<script type="text/x-handlebars" data-template-name="components/signup-cta">
	<div class="signup-cta alert alert-info">
		{{#if session.hideSignupCta}}
			<p>
				{{i18n "signup_cta.hidden_for_session"}}
			</p>
		{{else}}
			<p>{{replace-emoji (i18n "signup_cta.intro")}}</p>
			<p>{{replace-emoji (i18n "signup_cta.value_prop")}}</p>

			<div class="buttons">
				{{d-button action="showCreateAccount" label="signup_cta.sign_up" icon="check" class="btn-primary"}}
				{{d-button action="hideForSession" label="signup_cta.hide_session" class="no-icon"}}
				<a {{action "neverShow"}}>{{i18n "signup_cta.hide_forever"}}</a>
			</div>
		{{/if}}
		<div class="clearfix"></div>
	</div>
</script>

```

And then add it to the `</head>` section of a theme.

Let me know if you need more help.

---

<div class="post-metadata">

**Author:** ![Francois\_Douville](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/francois_douville/32/94221_2.png) [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Post date:** [2018年二月27日 14:01 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/3 "2018-02-27T14:01:12Z")

</div>

Ok I changed it but I don’t know how to check if it worked?

Also, if an anonymous user want to reply or do anything at all, it always convert to the “sign in” form. Can I change all that to the “sign up” form (link to memberful)? Like I did with the signup CTA.

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [2018年二月27日 15:57 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/4 "2018-02-27T15:57:20Z")

</div>

> [@Francois\_Douville](#):
>
> I don’t know how to check if it worked?

You can either sign out of your account and browser the site a bit until you see it or you can force it to display by temporarily modifying another template.

for example:

If you add this

```plaintext
<script type="text/x-handlebars" data-template-name="application">
  {{plugin-outlet name="above-site-header"}}
  {{site-header canSignUp=canSignUp
                showCreateAccount=(route-action "showCreateAccount")
                showLogin=(route-action "showLogin")
                showKeyboard=(route-action "showKeyboardShortcutsHelp")
                toggleMobileView=(route-action "toggleMobileView")
                toggleAnonymous=(route-action "toggleAnonymous")
                logout=(route-action "logout")}}

  {{plugin-outlet name="below-site-header" args=(hash currentPath=currentPath)}}

  <div id="main-outlet" class="wrap">
    <div class="container">
      {{#if showTop}}
        {{custom-html name="top"}}
      {{/if}}
      {{global-notice}}
      {{create-topics-notice}}
    </div>
    {{outlet}}
    {{outlet "user-card"}}
  </div>

  {{signup-cta}}
  {{plugin-outlet name="above-footer" args=(hash showFooter=showFooter)}}
  {{#if showFooter}}
    {{custom-html name="footer" triggerAppEvent="true"}}
  {{/if}}
  {{plugin-outlet name="below-footer" args=(hash showFooter=showFooter)}}

  {{outlet "modal"}}
  {{topic-entrance}}
  {{outlet "composer"}}
</script>

```

You should see the CTA from in the footer of every page. You can then make any changes you want. **Once you’re done testing just delete this template override.**

> [@Francois\_Douville](#):
>
> Also, if an anonymous user want to reply or do anything at all, it always convert to the “sign in” form. Can I change all that to the “sign up” form (link to memberful)? Like I did with the signup CTA.

Yes this is also possible to do in the same fashion, however, it’s probably more efficient to use a plugin outlet to inject a new button and use CSS to remove the default button.

I will check on this tomorrow.

---

<div class="post-metadata">

**Author:** ![Francois\_Douville](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/francois_douville/32/94221_2.png) [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Post date:** [2018年二月27日 16:07 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/5 "2018-02-27T16:07:08Z")

</div>

Thanks a lot. So the “sign up” link is not where it should be.

 ![16](https://global.discourse-cdn.com/meta/original/3X/9/9/992192596e7ac2428018f2b7be05f626509ce61d.png)

This is the code :

```
<script type="text/x-handlebars" data-template-name="components/signup-cta">
<div class="signup-cta alert alert-info">
	{{#if session.hideSignupCta}}
		<p>
			{{i18n "signup_cta.hidden_for_session"}}
		</p>
	{{else}}
		<p>{{replace-emoji (i18n "signup_cta.intro")}}</p>
		<p>{{replace-emoji (i18n "signup_cta.value_prop")}}</p>

		<div class="buttons">
			<a href="https://lepeuplier.memberful.com/checkout?plan=27167" target="_blank">Sign up</a>
			{{d-button action="hideForSession" label="signup_cta.hide_session" class="no-icon"}}
			<a {{action "neverShow"}}>{{i18n "signup_cta.hide_forever"}}</a>
		</div>
	{{/if}}
	<div class="clearfix"></div>
</div>

```

---

<div class="post-metadata">

**Author:** ![Francois\_Douville](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/francois_douville/32/94221_2.png) [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Post date:** [2018年二月28日 15:36 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/6 "2018-02-28T15:36:19Z")

</div>

If someone know how to make it a button like the default sign up button. And place it in the left side of the reminding button.

Thanks!

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [2018年三月1日 05:15 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/7 "2018-03-01T05:15:33Z")

</div>

Here’s what you need to make the link look like a button:

```plaintext
<script type="text/x-handlebars" data-template-name="components/signup-cta">
	<div class="signup-cta alert alert-info">
		{{#if session.hideSignupCta}}
			<p>
				{{i18n "signup_cta.hidden_for_session"}}
			</p>
		{{else}}
			<p>{{replace-emoji (i18n "signup_cta.intro")}}</p>
			<p>{{replace-emoji (i18n "signup_cta.value_prop")}}</p>

			<div class="buttons">
    			<a target="_blank" id="sso-signup" class="btn-primary btn-primary btn btn-icon-text" href="https://google.com">
    			    {{d-icon "check"}}<span class="d-button-label">sign up</span>
    			</a>
				{{d-button action="hideForSession" label="signup_cta.hide_session" class="no-icon"}}
				<a {{action "neverShow"}}>{{i18n "signup_cta.hide_forever"}}</a>
			</div>
		{{/if}}
		<div class="clearfix"></div>
	</div>
</script> 

```

and this CSS:

```plaintext
#sso-signup {
	float: none;
	text-decoration: none;
}

```

Just make sure you change the href above and the wording for signup

. It looks like this now:

 ![Untitled](https://global.discourse-cdn.com/meta/original/3X/0/a/0ae25ece0ce713b34343d673ababede2e8b1076a.jpg)

As for the second part:

> [@Francois\_Douville](#):
>
> Also, if an anonymous user want to reply or do anything at all, it always convert to the “sign in” form. Can I change all that to the “sign up” form (link to memberful)? Like I did with the signup CTA.

First you need this CSS to hide the default button:

```plaintext
.anon #topic-footer-buttons button {
    display: none;
}

```

Then you need this to inject a new button/link

```plaintext
<script type='text/x-handlebars' data-template-name='/connectors/topic-above-suggested/add-sso-button'>
    <a target="_blank" id="sso-reply" class="btn-primary btn-primary btn btn-icon-text" href="https://google.com">
        {{d-icon "reply"}}<span class="d-button-label">Reply</span>
    </a>
</script>

```

And it would look like this:

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/5/6/5690b2eb1c4d03a350689e114aed7aee6df1dd34.PNG)

Again, make sure you change the label and href in the code your needs.

Let me know if you need more help.

---

<div class="post-metadata">

**Author:** ![Francois\_Douville](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/francois_douville/32/94221_2.png) [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Post date:** [2018年三月1日 13:02 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/8 "2018-03-01T13:02:14Z")

</div>

Thanks so much for your time! Very appreciated 😃

---

<div class="post-metadata">

**Author:** ![Francois\_Douville](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/francois_douville/32/94221_2.png) [@Francois\_Douville](https://meta.discourse.org/u/Francois_Douville)\
**Post date:** [2018年四月18日 15:44 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/9 "2018-04-18T15:44:45Z")

</div>

> [@Johani](#):
>
> First you need this CSS to hide the default button:
> 
> .anon #topic-footer-buttons button {  
> display: none;  
> }
> 
> Then you need this to inject a new button/link
> 
> \<script type=‘text/x-handlebars’ data-template-name=‘/connectors/topic-above-suggested/add-sso-button’\>  
> \<a target=“\_blank” id=“sso-reply” class=“btn-primary btn-primary btn btn-icon-text” href=“[https://google.com](https://google.com)”\>  
> {{d-icon “reply”}}\<span class=“d-button-label”\>Reply\</span\>  
> \</a\>  
> \</script\>

I add it to my forum and it add the button even for members. I have now 2 buttons.

 ![27](https://global.discourse-cdn.com/meta/original/3X/c/c/ccd2d6edc1ae2cd1b10f35b2c8c836efdb77662c.png)

---

<div class="post-metadata">

**Author:** ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)\
**Post date:** [2018年六月22日 00:10 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/10 "2018-06-22T00:10:34Z")

</div>

I was able to fix the double buttons by using this

```
#sso-reply {
    display: none;
}
.anon #sso-reply {
    display: inline;
}

```

---

<div class="post-metadata">

**Author:** ![aksoforever](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aksoforever/32/502615_2.png) [@aksoforever](https://meta.discourse.org/u/aksoforever)\
**Post date:** [2019年五月31日 02:15 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/11 "2019-05-31T02:15:39Z")

</div>

Hi，Johani, i want to change the text in signup CTA,  
can you tell me how to custom the text in this pic

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/d/0d2572941339a2de218336e68c08d13366478aeb.jpeg)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年五月31日 03:04 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/12 "2019-05-31T03:04:15Z")

</div>

Search for that text string in Admin, Customize, Text.

---

<div class="post-metadata">

**Author:** ![aksoforever](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aksoforever/32/502615_2.png) [@aksoforever](https://meta.discourse.org/u/aksoforever)\
**Post date:** [2019年五月31日 03:10 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/13 "2019-05-31T03:10:06Z")

</div>

Thank you very much，found it.😆😆😆

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/d/ed59cb95fbbfdd2c0a1860eff9ef8ea7d0e0b5af.png)

---

<div class="post-metadata">

**Author:** ![darteweb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darteweb/32/206278_2.png) [@darteweb](https://meta.discourse.org/u/darteweb)\
**Post date:** [2021年一月16日 17:31 UTC](https://meta.discourse.org/t/change-link-signup-cta/81649/14 "2021-01-16T17:31:16Z")

</div>

你好，我也尝试了同样的操作。

我尝试将 Signup 更新为 Join，但前端没有反映出来。能请您帮忙吗！
