WordPress Optimized!

More than just another WordPress site

Menu
Skip to content
  • Home
    • Privacy
    • Disclaimer
  • Index
  • Plugin
  • Errors
  • Troubleshooting
  • Security
  • Code Snippet
  • Performance
  • 2BearStudio
  • Posted on June 21, 2014September 15, 2014
  • by Jerry Wang

Redirect User Registration to Custom Registration Page

Let’s say we’ve customized a beautiful user registration form, with extra fields, well-designed interface blending nicely with the theme. But how about when you type in this url:

http://url/wp-login?action=register

Well, because we allow “Anyone can register” in general settings, the register link is open to public. Which will lead visitors to the default registration page you wanted to hide at the first place.

wordpress-login-screen

Don’t worry, put following code in function.php or your custom plugin (my favorite method), and change the “registraion-url” to slug of your custom registration page.

// Redirect Registration Page
function my_registration_page_redirect()
{
	global $pagenow;

	if ( ( strtolower($pagenow) == 'wp-login.php') && ( strtolower( $_GET['action']) == 'register' ) ) {
		wp_redirect( home_url('/registration-url'));
	}
}

add_filter( 'init', 'my_registration_page_redirect' );

 

 

Redirect User Registration to Custom Registration Page was last modified: September 15th, 2014 by Jerry Wang

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Related posts:

  1. WooCommerce Subscriptions Customization: Restore Additional Profile Field Added by PMP Register Helper
  2. Missing User Registration Date?
  3. Change Howdy User Greeting Message on WordPress Admin Bar
  4. Troubleshooting: This Webpage Has a Redirect Loop
  5. 404 Page error on WordPress Pagination in Custom Post Type
Posted in Code SnippetTagged Registration, wp_redirect(), wp-login.php

Post navigation

Prev Troubleshooting: BackWPup Next Cron Job at Dec 31, 1969
Next How to Make TubePress Responsive

Recent Posts

  • Make Uncode theme working on your DreamHost shared hosting account
  • Remove /?doing_wp_cron from URL
  • My New iMac Setup Troubleshooting
  • How to Replace Huge Image with Optimized Version the Easy Way
  • How to disable Guternberg Editor – the new Block Editor in WordPress 5
  • How to increase Max Input Vars on DreamHost shared hosting account
  • How to Upgrade to WordPress 5.0 without losing Classic Editor
  • WordPress Security Tip – Avoid using these usernames
The Ultimate Managed Hosting Platform

Recommended WordPress Hosting

Web Hosting  Fastest WordPress Hosting

Coupon & Promotion

  • 10% saving on S2Member Pro (Single-site)
  • 10% saving on S2Member Pro (Unlimited-site)
  • Hostgator 25% off coupon: 25offhosing

WordPress Themes & Plugins

 

Tags

.htaccess 404 500 add_filter() Admin Archive Backup BackWPup Block Editor Coda Cron Custom Post Type DreamHost Email Error Guternberg Hack IfModule Login Membership Menu mobile password Performance PHP Plugin redirect Registration Responsive Revision Search Security Settings SSH Theme Troubleshooting Update WooCommerce wp- WP-CONFIG.PHP wp-login.php wp_query() wp_redirect() WP_TEMP_DIR WSOD

Recommended Plugins

  Gravity Forms Plugin for WordPress   s2MemberĀ® (WordPress Membership Plugin)

Categories

  • Code Snippet (30)
  • General (17)
  • Mobile (3)
  • Performance (9)
  • Plugin (23)
  • Security (17)
  • Troubleshooting (29)

Archives

© Copyright 2022 – WordPress Optimized!
Retina Theme by WPAisle ⋅ Powered by WordPress