Have you tried
add_theme_support( ‘title-tag’ );
And remove the title tag from your theme, and call the wp_head() at proper place.And let wp handle the title tag for you.
Have you tried
add_theme_support( ‘title-tag’ );
And remove the title tag from your theme, and call the wp_head() at proper place.And let wp handle the title tag for you.