Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1422828

    Gnomo Bàgnolo
    Participant

    Hi there

    I’d like to better understand H1 behavior in X Theme

    Some site analyzer alert me in order to:

    28 Errors: pages with more than one H1 tag
    some examples:
    https://www.ilsentierodeglignomi.it/
    https://www.ilsentierodeglignomi.it/blog/
    https://www.ilsentierodeglignomi.it/la-magica-favola-di-gnomo-bagnolo/

    Could you help me in order to resolve this issue?

    Thank You

    #1423210

    Rupok
    Member

    Hi there,

    Thanks for writing in! To resolve any issue we need to understand the issue first. Which site you are using and what’s wrong with the h1 tag? Let us know about the problem.

    Cheers!

    #1423239

    Gnomo Bàgnolo
    Participant

    Hi there

    I’m sorry

    The site is:
    https://www.ilsentierodeglignomi.it/

    onpage.org reports me that 28 pages have more than one H1 tag

    Per page should only be one H1.

    Thank You

    #1424060

    Paul R
    Moderator

    Hi,

    To fix it, create file _brand.php in wp-content/themes/x-child/framework/views/global
    and copy the code below into that file.

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

    Hope that helps.