• Hello everybody,
    I’m trying to use the wp_login_form() function outside of the wordpress directory of my site. On the page where I need the form to appear I’ve included the wp-blog-header.php and the login form is appearing correctly, it works like a charm, there’s only a small issue with it, it doesn’t accept a redirect url different than the url of my wordpress dashboard… I’ll explain with an example:
    https://example.net/wordpress is the directory with the WP installation, https://example.net/other is the directory where I’ve put the page I need the form to appear into. Inside that page I call the wp_login_form() like this:
    <?php wp_login_form('redirect=https://example.net/other/index.php'); ?>
    but this doesn’t work and the form, after I correctly login, redirects me to https://example.net/wordpress/wp-admin/&#8230; I don’t understand why it goes like this.
    I also tried to put the whole array as in the codex explanation page for the function, but it doesn’t work either.
    Looking at the resulting html code I see that an hidden input appears with name “redirect_to” and value “https://example.net/other/index.php&#8221;, but it’s kinda useless since the form always returns me to the dashboard.

    How can I work around this small issue??
    Thanks in advance

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_login_form() redirect not working properly’ is closed to new replies.