When a person who is reading a post tries to login from comment-form, they get taken to their profile page. How can they be redirected back to the page from which they logged in?
Can you please tell how I can modify the below piece of code to suit my purpose?
function _my_redirect_to($url){
return home_url();
}
// Add filter.
add_filter('gianism_redirect_to', '_my_redirect_to');
When a person who is reading a post tries to login from comment-form, they get taken to their profile page. How can they be redirected back to the page from which they logged in?
Can you please tell how I can modify the below piece of code to suit my purpose?
function _my_redirect_to($url){ return home_url(); } // Add filter. add_filter('gianism_redirect_to', '_my_redirect_to');