Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Website Setup › Forms › REDITECT WP LOGIN TO AJAX LOGIN AFTER ACTIVATION
- This topic has 8 replies, 2 voices, and was last updated 5 years, 10 months ago by Themosaurus.
-
AuthorPosts
-
@themosaurus
- 1 Topics
- 1675 Posts
Hi Raja,
Here is a code snippet to redirect the wp-login.php page to your Login With Ajax page:
function gwangi_possibly_redirect(){ global $pagenow; if( 'wp-login.php' == $pagenow ) { if ( isset( $_POST['wp-submit'] ) || ( isset($_GET['action']) && $_GET['action']=='logout') || ( isset($_GET['checkemail']) && $_GET['checkemail']=='confirm') || ( isset($_GET['checkemail']) && $_GET['checkemail']=='registered') ) return; else wp_redirect(home_url('/login')); exit(); } } add_action( 'init', 'gwangi_possibly_redirect' );
Don’t forget to replace the
/login
part by your login page name if you are not using the same.To add this code snippet to your site, we recommend that you use a the Code Snippet plugin (https://fr.wordpress.org/plugins/code-snippets/).
Regards,
June 21, 2018 at 14:36 #875@themosaurus- 1 Topics
- 1675 Posts
Did this happen after you installed the code snippet that we provided you? Also, do you have a link to your website that you could send us so that we can take a closer look?
Regards,
June 21, 2018 at 15:09 #882RajaParticipant@xcrosstech- 12 Topics
- 46 Posts
https://www.xcross.tech
it happened before installing the snippetJune 21, 2018 at 15:28 #883@themosaurus- 1 Topics
- 1675 Posts
Hi Raja,
I’m glad that you managed to resolve your issue.
I see that you implemented the snippet and it looks like it’s working well.Don’t hesitate to create a new topic if you have any other issue with the theme.
Regards,
June 22, 2018 at 07:49 #895 -
AuthorPosts
The topic ‘REDITECT WP LOGIN TO AJAX LOGIN AFTER ACTIVATION’ is closed to new replies.