WordPress.org

Forums

Rename wp-login.php (unmaintained)
[resolved] How do I redirect to home url upon logout? (5 posts)

  1. Shortdot
    Member
    Posted 1 year ago #

    Hi there!

    So far the plugin is working just fine with all my customizations except for logging out.

    I installed the plugin through the Plugins page of my WordPress Dashboard and set my new renamed login page to "connect" (It reads: http://www.benscg.com/connect/ in the Settings).

    I am using BBPress 2.5.1 and logging my users in through the BBpress Login Widget that comes with it. When I login as a normal user, everything works just fine and the user is logged in, remaining on the homepage url and the widget updates accordingly. I can perform the lost-password functionality with a normal user just fine and be redirected exactly where I want them to go afterwards and I can use the Register page with WP-reCAPTCHA (soon to be replaced though) just fine as a normal user, getting them redirected to my homepage with a custom message I setup.

    That all still works with this plugin right out of the box. So Awesome!

    However, when a normal user logs out, they get redirected to: "http://www.benscg.com/connect/?loggedout=true" and it shows the wordpress backend. :(

    I just want to have a logged out user to be redirected to the home page (http://www.benscg.com) when they click the logout button instead of the wordpress backend noted above...

    I tried to find a hook/filter to setup in my functions.php to control this, but I don't know if it's your plugin, wordpress, or BBpress causing the redirect to the new URL. I also tried to modify your logout_url() function in the rename-wp-login.php file directly through the Plugin Editor, but changed it back to the original function after no luck. I must be missing something somewhere... lol.

    If I deactivate the plugin, everything works as I intend it to...

    The pages are live, so if you want to create a user to test it out or something, be my guest. Let me know who it is and I'll delete you afterwards, ect... If you need anything else, just ask.

    Thanks for helping and providing this cool plugin!

    http://wordpress.org/plugins/rename-wp-login/

  2. Ella Iseulde Van Dorpe
    Member
    Plugin Author

    Posted 1 year ago #

    So logging out redirects to http://www.benscg.com/connect/?loggedout=true by default. You could use a hook to change this, and maybe bbPress changes this too. Can you confirm that, when deactivating this plugin and keeping bbPress activated, logging out redirects you to the homepage? If so, I'll check what bbPress is doing, but normally a hook should keep working.

  3. Shortdot
    Member
    Posted 1 year ago #

    It took me a bit, but I can confirm that deactivating the plugin and then logging in and out will redirect the user to the home page without them seeing the backend.

    The only time they see the backend is logging out while this plugin is activated. Logging in works just fine.

    The only custom redirect I use in my WordPress functions.php file is below:

    function custom_bbp_redirect($url) {
    
    	return 'http://www.benscg.com';
    }
    add_filter( 'bbp_user_register_redirect_to', 'custom_bbp_redirect' );

    Everything else is handled by the standard BBPress Login Widget.

  4. Ella Iseulde Van Dorpe
    Member
    Plugin Author

    Posted 1 year ago #

    Could you try this again with version 2.0? It hooks in a bit later which may solve your problem. Thanks!

  5. Shortdot
    Member
    Posted 1 year ago #

    So far everything from login to logout seems to be in working order now with 2.0 activated. Logout no longer redirects me to the wordpress backend and the user stays on the homepage afterwards.

    Thanks alot!

    I'll repost a new thread if I run into the issue again...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Rename wp-login.php (unmaintained)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic