Underscore Theme: Switch Site Title/Page Title

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:

<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>

But when I switch these around, I don’t see a difference in the frontend.

Is anyone familiar with the Underscores theme and would know where I can go to ‘fix’ this?

I’ve installed Yoast SEO, but had disabled it while I’m trying to find out why the Site/Page title are not right.

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.

1 Like

WebMachine,

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.

Yeah, I saw the same thing. No difference.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.