Currently I am trying to replace the $post
global with another dynamically loaded post in the wp
action. However, while even in the templates the correct post data shows when outputting $post
, the actual output content isn't updated. I backtraced through the entire the_content
function, but I can't find anything out of the ordinary.
Is this even possible, and if so, what am I missing?
$post
global is not going to help you as anything later on can change the its value. Even the main loop changes the$post
global. IMHO, you are on the wrong track here – Pieter Goosen Feb 26 '16 at 8:39$post
by default, if nothing breaks it, holds the first post in the loop of the main query – Pieter Goosen Feb 26 '16 at 9:11