H1 class="visually-hidden" Headline/h1

Hi there,

my theme is generating a h1 ontop of each page with I assue the website’s name. How can I kill it? i don’t like having two h1’s
div class=“x-navbar-wrap”
div class=“x-navbar”
div class=“x-navbar-inner”
div class=“x-container max width”

h1 class=“visually-hidden” headline /h1

Thank’s&best regards,

Moritz

Hi Moritz,

Thanks for writing in! To remove visually hidden element, first you have to install and activate the child theme(https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

After, create this directory: x-child/framework/legacy/cranium/headers/views/global/ in your child theme and create a file _brand.php file with the following code:

<?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>

With regard to your other concerns, having multiple h1 was detrimental to SEO in the past. But, that is not the case now. X was built using HTML5 and having 2 h1 tags is structurally valid because they’re part of different areas. Also, in modern SEO in combination with HTML5, having multiple h1 will not have an impact on your ranking. X was built with SEO in mind so it’s structurally optimized. You should focus on quality content instead.

Let us know if you have any further questions.
Thanks!

1 Like

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