Register Short Code
-
The shortcodes available are only logins how do I add a register shortcode.
-
This topic was modified 2 years, 7 months ago by
bigchips23.
-
This topic was modified 2 years, 7 months ago by
-
Hi @bigchips23
Actually our social buttons can be used for both registration and login.
- If the person already has a WordPress account linked to the currently used social media account then it will log the user in.
- If the social media account is not linked to any WordPress account yet, however the email address match with the email address of an existing WordPress account that doesn’t have the another social media account linked from the same provider, then we could automatically link the social media account to that WordPress account and log the person in.
- If there is no email match and there is no link either, then we will register a new account.
So actually it is only the label that changes in some cases, but the logic behind remains the same.
Anyways if you want to display a social button with registration specific labels, then you should:
- go to our Global Settings > General tab: https://nextendweb.com/nextend-social-login-docs/global-settings/
- enable our “Custom label for register buttons” setting
- then on the Buttons tab of each provider the “Register label” option will show up, and you will be able to customize that – https://nextendweb.com/nextend-social-login-docs/buttons/
- finally you can render the register state of the buttons using the labeltype shortcode parameter with “register” value, e.g.: [nextend_social_login labeltype=”register”]
If you are interested, in our documentation you can find our available shortcode parameters:
Best regards,
Laszlo.Hi @laszloszalvak,
If there is no email match and there is no link either, then we will register a new account.
Is there a way to show a prompt that their user account doesn’t exist on the site or redirect the visitor to another page when the email ID associated with the social account is not present in the WP?
Thanks,
UdayHi @uday17035!
Without custom coding you can’t display such messages, I am sorry.
Anyways if the social media email address doesn’t exist on your WordPress site yet and the account is not linked to any existing WordPress accounts either, then that means we need to register a new account, so at some point the user will end up in our Register flow if the registration is enabled on your site.
So if you are familiar with coding, then when the users gets into our Register flow, you could display some texts in our form, like you see here:
https://nextendweb.com/nextend-social-login-docs/backend-developer/#custom-fields
and then if they press the register button the account would be registered.If you don’t want to do custom coding, and the redirect is enough, then if we registered a new account that already means that the social media email address wasn’t registered on your site before. So you could simply redirect these users to a page after the registration. For this you should use our “Fixed redirect url – for Register” setting, where you should enter the URL of the page where you want to redirect to. This setting can be found on our General tab:
In that case, if your ultimate goal is to prevent the registration with social login, then you should simply disable our Membership setting, that you can also find on our General tab, and then if you want to specify a custo merror message maybe a custom redirect, then you could use the:
- nsl_disabled_register_redirect_url
- nsl_disabled_register_error_message
filters:
Best regards,
Laszlo.-
This reply was modified 2 years, 4 months ago by
Laszlo.
Hi @laszloszalvak,
I appreciate your response.
I am a developer, well familiar with custom coding. Thanks for sharing code snippets.
I’m using MemberPress and wanted to go with your pro plugin but I found in the documentation that “The social connect buttons are not shown at the MemberPress Memberships form”, hence I’m trying with custom coding.
Using custom coding, I have successfully added “Continue with Google” button on the custom login page and on the membership form page. The only problem I have is on the login page. I want users to know that if they “Continue with Google” from the “login” page and the email is not present on the site, show the message that they are not registered with the site. Also, a CTA to go to the membership/sales page.
Is this something can be achieved using the pro version of this plugin?
Thanks,
UdayHi @uday17035
The Pro Addon is actually able to display the social buttons in the MemberPress forms, however please note that, as pre the forum rules:
commercial products can not be supported on this forum. So if you have questions or problems, connected to features available only in the Pro Addon then please open rather a support ticket here:
and we will discuss this matter there.
Anyways the way the registration and the login works is the same in both the Free and the Pro Addon. So what I can tell you here is that, Nextend Social Login is using the default WordPress registration and user management. Currently we don’t have a custom integration or user management codes for MemberPress – MemberShip status itself. This means, users registered with Social Login won’t have any custom Membership permissions granted, they will behave as users registered via the default login at the /wp-login.php page.
If you have already managed to display the social button on that page via custom coding, then another thing you need to know is that by default Nextend Social Login redirects the users back to the same page where the social button was pressed, the user will see the same membership form after the login/registration. So there the person can manually sign up to the membership after logged in with social login.
But we can not guarantee that they will actually sign up.So if you want to avoid accounts without memberships, then the best I could suggest is:
A.) assign a membership to the account programmatically ( e.g. we run the nsl_register_new_user action after we registered a new account – https://nextendweb.com/nextend-social-login-docs/backend-developer/#content-flow – and there you could run such codes)
B.) Disable the registration with social login ( by setting our own Membership to Disabled ). That way only those people could use social login, whose social media email address is the same as the email address of an existing account. Or those who manually linked their social media accounts to an existing account ( via the link state of the social buttons, that you could display with the shortcode if you use the corresponding parameter: https://nextendweb.com/nextend-social-login-docs/theme-developer/#shortcode )As for redirecting the user to the membership/sales page:
If you publish the social buttons with the shortcode, then you can use the redirect parameter to control where the redirect should happen.
Or if you always want the social buttons to redirect to the same page, then you can use the “Fixed redirect url” -for Login / for Registration setting on our General tab, where you could enter the URL where you want to redirect to. – https://nextendweb.com/nextend-social-login-docs/global-settings/Best regards,
Laszlo.Hi @laszloszalvak ,
Thanks for your detailed response.
I understand, I will reach out to you via your website for premium plugin queries.
Thanks for sharing more resources. You are the best. I think I have got answer to my question.
Regards,
Uday
- The topic ‘Register Short Code’ is closed to new replies.