Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #858973

    Eric-InPursuit
    Participant

    I just created an OnPage.org account and noticed that I’ve got two h1 tags being used.

    http://campstoregear.com

    The first (“Camp Store Gear…”) is being brought in automatically and i don’t want it. I’m not even sure where it’s pulling the text from. The page title is just “home”

    The second (“We help Summer Camps…”) is the one I would like to be “H1”

    What are my options?

    #859676

    John Ezra
    Member

    Hi there,

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    From what’s already attached, we can see that you are referring to the visually hidden h1 that is there by default. This can be changed via your dashboard.

    Dashboard > Settings > General > Site Title >> change to whatever you like.

    As for the second, H1 you are referring to, where is it and how was it created? Thanks!

    #860867

    Eric-InPursuit
    Participant

    Ok so it’s the site title, I thought it was a page title. My concern is for SEO. My understanding is that you only want one h1 tag on a page. If this is the case, I would prefer that the Site Title be something other than h1. Am I thinking right here?

    #861589

    Friech
    Moderator

    Hi There,

    Good thing you already have the child theme. Please navigate to your child theme’s \x-child\framework\views\global\ directory and create a file named _brand.php, then paste the code below and save 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 . '">';
    
    ?>
    
    <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?>
    
    <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
      <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    </a>

    Look at this line: '<h1 class="visually-hidden">' . $site_name . '</h1>'

    That is the h1 tag that you want to edit. You can replace that with other heading (h2 – h6) or <div> tag.

    Hope it helps, Cheers!

    #862646

    Eric-InPursuit
    Participant

    That’s perfect!!! thanks for your help!

    #863331

    Rue Nel
    Moderator

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