Many thanks for your reply! Yes, I checked all that previously, and all that is working. I guess I must have more clearly put my question. I wanted the user to be redirected to the referral page after login.
Here is the sequence: 1) The user is on one of my blog post pages (https://www.freelogica.kz/chto-takoe-freelogica/). In order to comment she needs to log in. 2) The user clicks on ‘Please log in to comment’ and is taken to my site’s login page (https://www.freelogica.kz/login/). 3) After logging in I would like the user to be taken back to the blog post page (https://www.freelogica.kz/chto-takoe-freelogica/).
But instead of that the login page gets refreshed and the user avatar is shown.
I think I understand why it could be happening. In order to replace the WordPress default login page, I inserted the below filter into the functions.php of my theme (Customify):
add_filter( 'login_url', 'my_login_linkchanger');
function my_login_linkchanger( $link ) {
/*whatever you need to do with the link*/
return home_url( '/login');
}
So, when I use the ‘Refresh active page’ option, it refreshes this login page.
Do you think that is the problem? If yes, do you think there is a way around this? In other words, I would still like using my custom /login page for login, and have the user redirected to the referral page (which I cannot set to one specific URL because obviously the user can come from any blog post page).
Million thanks for the amazing plugin!