Back button url depending of previous page

I have a single post page on wordpress which can be accessible from two archive page.
I put a back button on this single post page and I would like to change the url of the back button depending of the previous page. Also I would like to change the url to one of the two archive if the single post is open in a new window.

Any idea is welcome.

Thank you

Thomas

Read more here: Back button url depending of previous page

Leave a Reply

Your email address will not be published. Required fields are marked *