login redirect works for only wp-admin

I am using the blogsmu theme. When using login url, armyguard.org/login the login redirect does not redirect to the desired page set in settings. However, if you login through wp-admin, the redirect works as advertised. I work prefer the redirect operates through the /login url. Any suggestions? Thanks

  • Alexander
    • DEV MAN’s Mascot

    The plugin is setup to work with the normal wordpress signup page. Are you using a custom login form? The redirect code should still work, so I could help you get it attached to the other form. Could you let me know how you've setup your login page?


  • Alexander
    • DEV MAN’s Mascot

    Thanks @kale407,

    Didn't recognize the theme at first. I was able to figure what's going on here. Login Redirect won't take affect if the login page is settings the "redirect_to" input on the login form. This isn't present on the standard login page, so Login Redirect allows custom forms to take precedence.

    To fix this, you'll need to remove this line from page-template-custom-login.php of your theme. Should be 49

    <input type="hidden" name="redirect_to" value="<?php echo bp_root_domain() ?>"/>

    Alternatively, you could duplicate that file, and set the template name at the top to something else. Then you can make changes without affecting the original file. You'd also need to go the the page itself and set it to the new template if you go this route.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.