I have sequence stack of filtersactions in custom plugin WP:

    add_action('the_post', 'post_callback');

   add_filter('the_content', 'modify_content');

    add_filter( 'the_title', 'wpse_filter_post_titles' );

Inside callback post_callback I modify $post object on custom values:

$post->post_title = "my";
$post->post_content = "my content";

Then, after all actions and filters I try to change HTML tag title on the page. To replace it on value from $post->post_title.

But, it brings some issues:

First is, that HEAD part of page had built before modification $post content.

I can assume that there is any function, that pushed all HTML page(view) to client, think it is the right way to replace title tag on custom value.

What do you think?

Read more here: How to change title tag at page after loaded post?


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: