Question

I'm having a wordpress site(still offline) which is basically a news paper site. Users has to registered to comment. My problem is that when users login for commenting on any article, they are redirected to profile page (or to home page if i use some plugins)... but the standard should be redirecting them to the referring page as to comment on that was the reason they logged in. What is the solution for this?

And another thing is the user profile, my site actually don't need a user profile but need option to change the password. By default the profile is same like the wp dashboard, how do i template it? Is it author.php file that i have to work on?

Was it helpful?

Solution

Regarding the redirection. You can simply specify the wp login url, where it should take them after they login.. For example.

<a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>

Takes you to the current page, after the login.. So place a link after the comment.

for disabling profile page modify wp-admin/profile.php like

define('IS_PROFILE_PAGE', true);

Change to:

define('IS_PROFILE_PAGE', false);

I hope you can find the wp comments login link easily in template files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top