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' );
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
But, it brings some issues:
First is, that
HEAD part of page had built before modification
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?