I’m using the Underscores theme to develop a WordPress site. Unfortunately, with the Underscores theme it lays out in the browser tab (<title>), Page Title | Site Name.
I cannot seem to find where I can hack in the Underscores theme to switch the Site Title to be first, then the Page Title.
There doesn’t seem to be a contact anywhere on Underscores site, so I figured this would be where I would go.
The header.php doesn’t have <title> so then that leads me to search in the ‘wp-includes’ for ‘header.php’. There is shows this:
I just installed Underscores in my locally developed base theme, and the Site Title shows up first, then the Page Title. I’ll take a look under the hood and see what’s there.
Have you come across anything. I have three sites, all using Underscores and all of the Site Titles are last. Regular WordPress installation brings the Site Titles first.
Sorry, I got hung up with work - just starting to dig in now. I found this code in the functions.php which might give you a clue -
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
It seems that that code directs WordPress to deal with the title. Try commenting out that code, and see if your changes will work then.