Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Theme Customizer › Menus › Clicking login redirects to WordPress login page
- This topic has 7 replies, 2 voices, and was last updated 4 years, 11 months ago by
Themosaurus.
-
AuthorPosts
-
KalleshibgParticipant@kalleshibg
- 18 Topics
- 36 Posts
When a user tries to login it directs to WordPress login page but I need the user to get the login page created by login with Ajax. And I also get a black title bar on top with WordPress logo which I did not see in demo content. Next I want to create something like male subscribers can access only female members and viceversa. Finally a need an option so that a member gets the details of a other registered member of interest after getting approval from the member.
October 10, 2018 at 00:41 #2740@themosaurus- 1 Topics
- 1676 Posts
Hi @kalleshibg,
Thank you for bring these issues to our attention. We’re glad to answer any question related with the setup/use of our theme.
However, it very difficult for us to provide the best support possible and to keep track of issues and their resolution if you so many questions in the same topic.
Moreover, it’s easier for us to share the resolution for a single issue with other members of our community facing the same problem.So, we will answer the first question in this topic. Can you please split the others into different topic?
By doing this, you will be making a great contribution to this forum, and we thank you very much for that!1) If you wish to create your login page with Login With Ajax (https://wordpress.org/plugins/login-with-ajax/) like we do on our demos, please make sure this plugin is activated on your server and then, read the following tutorial to find how to setup an only login form page:
Best regards,
October 11, 2018 at 10:54 #2759KalleshibgParticipant@kalleshibg- 18 Topics
- 36 Posts
Hi, I have created the login page referring the link attached and changed the login and logout menus url to show login page but every time I try to log in from any device it takes me to the WordPress login screen.
October 11, 2018 at 14:57 #2766@themosaurus- 1 Topics
- 1676 Posts
Hi @kalleshibg,
To redirect all calls to the wp-login.php page to your Register/login page, please add the following code snippet to your website:
function gwangi_custom_login_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_custom_login_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 Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:
We hope this will solve your issue. ?
Best,
October 11, 2018 at 15:09 #2769KalleshibgParticipant@kalleshibg- 18 Topics
- 36 Posts
This reply has been marked as private.October 11, 2018 at 15:18 #2770@themosaurus- 1 Topics
- 1676 Posts
Hi @kalleshibg,
To replace the link from the drop-down menu displayed to the logged-out users, simple go your Menu settings and edit the “User – Logged Out” menu. You can replace the “Login” link by your Login With AJAX page.
To redirect all calls to the
wp-login.php
page to your Register/login page, please add the previously given code snippet to your website.We hope that it will solve your issue.
Regards,
October 11, 2018 at 15:40 #2772KalleshibgParticipant@kalleshibg- 18 Topics
- 36 Posts
Perfect this works for me. Although I did not paste the code instead I deleted the login menu from logged out menu and recreated the login my linking to the ajax login page. works fine now , thanks.
October 11, 2018 at 20:15 #2781@themosaurus- 1 Topics
- 1676 Posts
You’re welcome. ?
Best regards,
October 12, 2018 at 16:00 #2814 -
AuthorPosts
The topic ‘Clicking login redirects to WordPress login page’ is closed to new replies.