• Hello:

    I have two pages which display posts from specific categories which I am using as a News page. These same posts can be accessed from either of these pages, and the post, when clicked, opens a custom-made template which includes a link for returning to the home page. What I would like to do is make this link dynamic. In other words, I would like WordPress to track from which page the post was visited, and adjust the link on the post page to return to that page. How might I go about accomplishing this? Thanks in advance for any assistance.

    Regards,

    Matthew

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Matthew,

    Let’s say you have 2 pages: A and B. Your users can access post C from either page A or page B, right? In this case, you might need to check the referrer URLs to determine if the user has access to post C from page A or B and then display the content accordingly.

    Could you send a sample page URL to take a look at?

    Thread Starter wowcroftynm

    (@wowcroftynm)

    Hello:

    The two pages from which the post can be accessed is the public facing news page and the members news page. Would I need to have two post pages that contain the same article? You may take a look at the URL below. This is the visitor news page, and the article appears on both the home page and the visitor news. Currently, the link on the post page will only return to the news page. But, I would like the link address to change if the post was accessed from the home page. The title of the post is Kudos to Matthew.

    The URL is https://miniden.us/news-visitor

    Thank you so much!

    Regards,

    Matthew

    Thread Starter wowcroftynm

    (@wowcroftynm)

    If you get a certificate error, you may safely disregard. The site is self-hosted with IIS and a AD CS certificate which is not signed at this point.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect to Page Depending on Link Clicked’ is closed to new replies.