Support Forum

Change register url

FU Funeral
Funeral
Member

hello i use a custom register link,i was wondering how i can change the default register link?

10 Answers

New Answer

MP Mr Papa
Mr Papa
Member

please see:  https://simple-press.com/documentation/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_registerbutton/

you will need to edit you sp theme (please make sure its a child theme or your own instead of editing ours), and change up that template tag with the registration url you want to use…

note the ‘link’ argument to the template function…

FU Funeral
Funeral
Member

so how would that look?

sp_RegisterButton(‘tagClass=spButton spRight’, __sp(‘Register’), __sp(‘Register’)); take out the last

 

_sp.. so something like this?

 

sp_RegisterButton(‘tagClass=spButton spRight’, __sp(‘Register’), ‘link’ => esc_url(wp_registration_url())

MP Mr Papa
Mr Papa
Member

Funeral said
so how would that look?

sp_RegisterButton(‘tagClass=spButton spRight’, __sp(‘Register’), __sp(‘Register’)); take out the last

 

_sp.. so something like this?

 

sp_RegisterButton(‘tagClass=spButton spRight’, __sp(‘Register’), ‘link’ => esc_url(wp_registration_url()

Sorry, on road with phone so can’t give you compete example, but…

Replace

 esc_url(wp_registration_url())

With url you want to use as a string in quotes…

FU Funeral
Funeral
Member

thats alright i can wait for the exact code. i keep getting errors

YS Yellow Swordfish
Yellow Swordfish
Member

Replace

esc_url(wp_registration_url())

with

esc_url('http://your-registration-url-here-in-quotes')

Give that a try…

MP Mr Papa
Mr Papa
Member

actually, some how we got off track here with the registration url… you must have looked at the actual core code…

lets step back and start over… 

in your sp theme, in the spHead.php template file, find this code:

            sp_RegisterButton(‘tagClass=spButton spRight’, __sp(‘Register’), __sp(‘Register’));

and change it to

            sp_RegisterButton(‘tagClass=spButton spRight&link=http://my_registration_url’, __sp(‘Register’), __sp(‘Register’));

as always, we strongly recommend you edit your own child theme or make your own theme to keep from losing changes…see:

https://simple-press.com/documentation/codex/themes/theme-basics/creating-a-theme/
https://simple-press.com/simplepress-version-5-5-child-themes/

sorry for the confusion…

FU Funeral
Funeral
Member

Awesome thanks! i was adding to the wrong spot haha

MP Mr Papa
Mr Papa
Member

you are welcome…  sorry we misunderstood you originally…

AW Arno Wakfer
Arno Wakfer
Member

I have followed this step by step and cannot seem to get it right 

sp_RegisterButton(‘tagClass=spButton spRight&link=http://www.accountantsforum.co.za’, __sp(‘Register’), __sp(‘Register’));

Is this code correct ?

www.accountantsforum.co.za

Thanks

Arno

YS Yellow Swordfish
Yellow Swordfish
Member

As far as I can see it looks right.

And can we confirm that you have made this change to the /forum-themes/css-only/templates/spHead.php file?