I cant seem to get this to work. What I'm trying to do is setup a "Login" link so that when the user clicks on it and logs in, it takes them 开发者_JAVA技巧back to the page they were on when they originally clicked the login button. I'd also like to do the same for when they press logout. Essentially I'm also stopping them seeing the dashboard at all.
Here's the code I have...
<a href="http://www.anymenu.co.uk/aberdeen/wp-login.php?redirect_to=<?php the_permalink(); ?>">Login</a>
Any help is much appreciated!
This plugin should do what you need.
Try this code:
<a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>
精彩评论