Just wondering how to filter to change the current page title from a shortcode,
Since shortocodes are rendering after $post.
any idea to archieve something like : do_shortcode(['mytitle="newtitle"']);
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communitywhy not to use the_title filter?
add_filter('the_title', 'the_title_filter');
function the_title_filter($title){
$post = get_post(get_the_id());
//enter code here
return $title;
}
as for shortcode - its imposible. in logical way - imposible.