I try every solution what I find on the net, but none of them work. I using generatepress.
My latest trying that, but not working...:
if ( is_front_page() && is_home() ) {
remove_theme_support( 'title-tag' );
echo '<title>' . get_bloginfo( 'name' ) . ' | mydomain.com</title>';
}
Very frustrating, but it does not matter what i writing to between the <title>
tags, I can even leave it empty so: <title></title>
, in every case the output will be this:
My Site Title | Tagline
I cannot use plugin for this, because I launch a multisite, and example if I modify my SEO plugin defaults settings in that core, the titles not will be dinamic on the home pages, so example my user create a page with this title: Original Site Title, I can solve it, that will be the home page title, if I get the bloginfo( 'name' ) in the All In One SEO Pack's core, but if my user change him site's title to Changed Site Title, the <title>
tag (what generating the plugin) will using later on the first title.
if ( is_front_page() || is_home() )
... as they do mean different things, they are not always the same page - depending on your setup.