Rewrite objec WP POST in wordpress?

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?

Leave a Reply

Your email address will not be published. Required fields are marked *