BuddyDev

Search

[Resolved] login redirect issues

  • Participant
    Level: Enlightened
    Posts: 33
    Mike OConnor on #21029

    I have this code below in my functions.php folder, but it is redirecting all users to wp-admin and not the site url. Any suggestions?

    /**
    * Redirect user to site home page when they register/login using BuddyPress Auto Activate Auto Login plugin.
    *
    * @return string
    */
    function buddydev_redirect_to_homepage_on_autologin() {
    return site_url( ‘/’ );
    }

    add_filter( ‘bpdev_autoactivate_redirect_url’, ‘buddydev_redirect_to_homepage_on_autologin’ );

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #21035

    Hi Mike,
    I am sorry for the inconvenience.
    Are you using any plugin that handles redirect on login? Or are you using a custom theme for login redirect?

    If possible, Please let me know your theme’s name. The above code should redirect your newly registered users to site’s home page.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 33
    Mike OConnor on #21040

    Hi Brajesh! Hope you’re having a good day! I just use Ajax Registration for login, but I also use Avada (custom theme). I don’t think any other plugins should affect this.

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #21042

    Hi Mike,
    Thank you. Hope you are having a good day too.

    It is most probably either ajax registration or the theme. I am hoping that it is the theme. Please allow me a couple of hours to test and get back to you.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 33
    Mike OConnor on #21043

    Thank you! I am going to ask Avada support to look into it as well. Thanks for connecting here and on LinkedIn too!

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #21063

    Hi Mike,
    Thank you.
    I have tested ajax registration and BP Auto Activate Auto Login now and the custom code from your first post worked as expected.

    Please let me know if the theme developers have some feedback about login redirect?

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 33
    Mike OConnor on #21075

    Hi Brajesh! Thank you for your time and effort! I am sure it’s a conflict on the theme end. Avada had me make a login page so I could use their fusion builder’s “user login”. From there I made a widget on the sidebar. The redirect still doesn’t work right because it takes people to a dead page, but they don’t go to the backend so it’s better. Should have that fixed here soon, but it’s definitely not an issue with the BuddyPress or Ajax Registration.

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #21084

    Thank you Mike.
    If you need me to debug it, I will do that gladly(I will need FTP access though).

    Please let me know if they are able to assist you or not .

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 33
    Mike OConnor on #21085

    That sure is a mighty kind offer, Brajesh! I’ll how they respond. May have to take you up on that. I’ll let you know either way. Thanks and have a great night!

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #21086

    Hi Mike,
    Thank you.
    No problem. I will be glad to assist 🙂

    Have a great night to you too.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved