I'm trying to prohibit visitors from viewing a course page on my WordPress site. Right now, I'm using a plugin to redirect the user to the login page if they try to access blocked content.
The problem is that I want the users to be returned to the page they came from once they log in. I'm currently using the Advanced Access Manager plugin, and can't seem to figure out a way to make it work. The user is just returned to the login page post login.
I'm not afraid to write custom PHP code to make this happen. I have programming experience, just not with PHP.
Any suggestions to put me on the right path would be much appreciated.