How to change site title back to H1?

Hi guys

the title of my site https://www.broughtonschoolofmotoring.com/

should be H1.

But it’s H2. I think it’s due to a change made in the child theme I’m using but I can’t see where.

Can you suggest a way to change it back to H1 and a way to make the site tagline H2?

Thanks.

Hello @stevetheadi,

Thanks for writing in!

Assuming that your WP install allows file editing, please go to Appearance > Theme Editor and edit the _brand.php file in your child theme. This is where you can modify your changes that you have in mind.

Kindly let us know how it goes.

Hi

Thanks for that!

How can I make the site tagline : Top quality driving lessons in Scunthorpe and Brigg - H2?

The brand.php file looks like this:

Hi @stevetheadi,

You can edit your _brand.php file located in your child theme to this:

<?php

$site_name = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );
$logo = x_make_protocol_relative( x_get_option( 'x_logo' ) );
$site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">';
?>
<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo
$site_description; ?>">
<?php echo ( $logo == '' ) ? '<h1 class="site-brand">' . $site_name . '</h1>' : $site_logo; ?>
</a>
<h2 class="site-tagline"><?php echo $site_description; ?></h2>

What I did is, I wrapped your site name in h1 tag and added the h2 tag for the site tagline. You probably need the following CSS to adjust the font size and margins:

.site-brand {
    margin: 0;
    font-size: 150%;
}

.site-tagline {
    margin: 0;
    font-size: 100%;
}

Hope this helps!

That’s brilliant!

Thanks for all your help, much appreciated.

You’re welcome!
We’re glad we were able to help you out.

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