filter hook to load a different post/page on current post/page


I have 2 pages:

  1. /contact
  2. /contact-team

The /contact page has a popup and on user selection, the page must reload but with the contents of /contact-team.

Is there a filter hook which can load a different post altogether after the URL has been generated?

I have tried the pre_get_posts to set the post ID but it gets redirected to that ID. I want the page loaded to be /contact but the content should be from /contact-team.
Any ideas?

Siddharth Thevaril 2 months 0 Answers 7 views 0

Leave an answer