You should be able to hook into the register_form_validation
hook (which may be the same hook you’re already using. I’m just not sure where they do the validation) and add something like:
function my_register_validation() {
if(isset($_GET['ref'])){
header('Location: http://www.example.com/wp-login?action=register&ref=$_GET[ref]');
}
add_filter(' my_register_validation', 'register_form');
I think that is the right idea the code above is untested but I think it gets you on the right track.
You said you were adding it to a secret form value so you might be able to use $_POST['secret_value']
instead.
Related Posts:
- Change register form action url
- Custom login and registration forms
- WordPress registration page template
- WordPress and Magento: let WordPress manage user registration and logins?
- Separate registration and login for different roles
- SSO / authentication integration with external ‘directory service’
- How to prefill WordPress registration with social details
- Check for correct username on custom login form
- Adding extra authentication field in login page
- Woocommerce registration page [closed]
- Is it possible to sign in with user_email in WordPress?
- WordPress registration message
- How can i increase the login expiration length?
- How do I use add_action from a class method?
- How to remove the WordPress logo from login and register page?
- Login email after registration never sent or received
- I want to disable E-Mail verifcation / activation when a user signs up for my WordPress site
- How do I check if a post is private?
- Receiving “This content cannot be displayed in a frame” error on login page
- My login form does not work
- Action wp_login_failed not working if only one field is filled out
- How to customise wp-login.php only for users who are setting a password for the first time?
- What hooks should I use for pre-login and pre-registration actions?
- wp_login action hook not working
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- Problem with logging in WP users automatically
- Is it possible a one click user registration with Facebook or Twitter (or other Social Networks)?
- How can i add validation to this login form with out it redirecting to the wp-login.php page
- Register/Login using only phone number?
- Force user to login in home page
- Force users to register in order to view website [duplicate]
- How do I force “users must be registered and logged in” on subsites?
- auto login after registeration for wp-members plugin
- How To Change Wp Register/Login URL Permanently To My Custom Page
- How can I do a URL redirection when an user uses wrong login details?
- Correct passwords keep appearing as incorrect
- How Can I Move Data From Form 1 To Form 2
- Disabling standard registration login with username/email and password?
- Login form doesn’t log in
- Get the url of custom login page in the registration page
- By registering always make uppercase the first letter of the login
- Show reCaptcha on Custom Frontend Login & Register Form [closed]
- Best option to implement external register/login to WP from self-made API
- Auto Login After Registration
- Disable all other page except index,register,login till user login
- easy steps to make front end form without plugin
- Redirecting after login?
- What speaks against using a custom login.php / register.php to wordpress?
- How do I add Login fields and registration link to the header?
- Sidebar login widget with error print, returns an error
- How to make a user be able to register if such a login already exists?
- How can I insert wordpress login screen on a different domain?
- add_action(‘init’) not work
- Change default login auth
- Sending new registration meta values to admin by email
- Reloading page with a query string upon login for admins
- Are login functions considered part of the WP backend?
- Removing “public” user registration without completely turning it off?
- Custom login modal page action
- Disable registration on certain condition
- what is the best and safest way to allow users to register to site
- Linking form to user meta fields
- How to change the login page without a plugin and not only customizing logo and text around the form?
- Updated : how to make email optional while user registration using default wordpress form
- How to post frontend login form to a different authentication script from wp-login?
- Problem in auto login after registration
- How to invalidate `password reset key` after being used
- wp_signon works localhost but not wokrs https site
- Check get_post value after wp-admin login
- Updating usermeta from login redirect to billing address
- How to Create a login for for subscribers only
- Chosen user password in registration is not being accepted on Login
- WordPress auto login user after registration only from a specific page
- User account activation links are lacking query strings
- How can I customize the content of the login page?
- Login user after registration programmatically
- Is there any reason why there’s no “login_header” action at the login page?
- How to get rid of the username of registration form in theme my login wp plugin?
- Custom user fields validation on registration
- Custom registration field to SQL database
- Where do I find “log in” and “register” link which are located on the top right corner?
- add unique code required to register
- How to force login after user browses for a few minutes or browses a few pages?
- Registration and Login form
- authenticate to another site using a login form on my site
- how to add custom word press regisration form in word press 3.5 with out module [closed]
- Click on banner to register to the blog
- How to put Login, Register and newsletter widget on the same page?
- make a login system for site visitors
- Redirect all pages to the custom login page except for the registration page
- How to create a fully functional user registration in WordPress?
- What is the proper way to apply the login_form_bottom filter?
- How to pass external variables to the wp_new_user_notification_email filter?
- Adding a new user from the front end
- Why does is_user_logged_in() return false after I change user password on the front end?
- WordPress – custom user flow registration approval
- How to change wp-admin and wp-login urls
- Entire WordPress content disappears
- Change password reqts with NO plugin without breaking resetpass link?
- Remove login link from Reset Password-screen