The problem in short: I need to be able to replicate the experience of a post on a static page, including title and meta tags. To do this, I need to set the pages post data to the post I’m cloning. However, when I call setup_postdata before get_header, I still get the head info from the original page.
Longer: So, the reason I’m doing this is, a client wants to have a custom url structure that doesn’t include a slug or ID, but a meta value. I was able to pass these meta values to a page, but obviously still need to run the query that will pull the correct post info. I can clone the entire post, except for the dang wp_head. Is there a way to set the wp_head to use the post information from another post/page?
I’ve attempted to hook into wp_head and alter the global wp_query AND post variables, but no luck. Will the easiest way to do this be to manually recreate the head on that page not using wp_head?