Why I can not rewrite object like as:

$ps =  get_post($post->id_content_replacement);
$post = $ps;

Where $ps is object Post too from action:

add_action('the_post', array($this, 'post_callback'));

So, I tried to modify object the_post by get_post()

Read more here: Rewrite objec WP POST in wordpress?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: