There are certain pages with a certain template in my wordpress site that all of them lead to a single page(S).
I want the content of the single page(S) to change based on where the user has came from.
In other words, I want to be able to detect that from which page the user has come to that single page(S).
Is there an easy way to do this? I'm not an advance user, just creating my first wordpress theme :).