• Hi,

    I had some code that displays a login box inside my header right side
    But i couldn’t get it to work, couldn’t login

    Is there anything else i can use?
    That will also redirect a user to the main page

    I don’t like them being redirected to that dash board
    Or even the wordpress login page

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Add:

    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />

    to your login form and when someone logs on it will redirect them to whatever page they were on when they initiated the login.

    You can replace:

    <?php echo $_SERVER['REQUEST_URI']; ?>

    with any url on your site, including your main page if you would rather.

    Thread Starter EMar

    (@sounds)

    Do you mean edit the wp-login.php
    Or my header.php

    No. This would be used if you were having a login box somewhere on your site. I wouldn’t suggest editing wp-login.php.

    Thread Starter EMar

    (@sounds)

    I don’t have anything form built in the header of the page
    Sorry i don’t get you

    Why cant we just have a option in the widgets where u can add to different sections of the site, footer, heaader, content. instead of just sidebar

    You can do all of that but it is specific to the theme you are using. Some themes have widget areas in all of those places but you have to use that theme or develop one yourself.

    I’m having a similar issue. I’m trying to add the MailChimp widget inside my header (not above it). I’m using 2010 Weaver. https://whooplon.com Any suggestions?

    Okay, resolved. I just put it in the header above my logo/banner and moved it around with CSS…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Put a login box inside headed that redirects’ is closed to new replies.