Remove <h1 class="visually-hidden"> Tags on each post

Hi

how do i remove these from appearing both visually and in the source code? i want to remove these multiple H1 tags for SEO purposes.

I have read similar threads on here but cant figure out the solution that works for my site. It’s having a detrimental effect on my sites SEO and would like to fix asap.

FYI i have a child theme already installed too.

Thanks!

Hi There,

Please copy this file from the parent theme: x/framework/legacy/cranium/headers/views/global/_brand.php

To child theme: x-child/framework/legacy/cranium/headers/views/global/_brand.php

After that change the source code of that file to:

<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================

$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 == '' ) ? $site_name : $site_logo; ?>
</a>

Thanks,

question though, my child theme doesnt have any of those folders from /legacy/cranium/headers/views/global/ onwards
do i recreate these first or just copy them directly from the parent theme ?

Yes, please create them first.

1 Like

EDITE: looks like it has worked after all :slight_smile: had to purge my CDN cache :slight_smile:

thank you!

I am glad you figured it out. :slight_smile:

1 Like

I’m trying to do the same. Is the url reflecting the name of this person’s theme? Or is this the URL for all websites? I love this idea! Was viewing Source and even though I only have on H1 tag, there are tons of H1 mentions in the source code at the top because source is viewing all the CSS etc. Let me know! Thank you!

Hi @ddubois63,

Thanks for writing around! The above code is for all stacks, it should work for you as well, please follow the above solution and let us know how it goes!.

Thanks!

Thank you, I shall give it a whirl :wink:

So is that for Pro as well? Just want to be sure! Thank you I will give it a whirl…

Hi there @ddubois63

Yes, this will work for Pro as well.

Thanks!

Works perfectly! Thank you!

You are most welcome. :slight_smile: