Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

sign in redirects to the wp login page

This topic is resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Aman
    Participant
    • 3 Topics
    • 3 Posts
    @amangandhi

    Hey there support team
    We have set up all the pages properly and now there is another problem that is persisting so kindly help regarding this problem.
    when we try to use pages for ex.
    visit here
    and if a user is not signed in it shows sign in button to the user and when we click on that button it jumps to wp login. we need to redirect that user to ajax login page so please tell us how can we change it.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi Aman,

    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://wordpress.org/plugins/code-snippets/). For more, please read the following post:

    Adding Custom PHP Without Changing Your Child Theme

    We hope this will solve your issue. ?

    Best,

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘sign in redirects to the wp login page’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site