• Resolved jbgglgdev

    (@jbgglgdev)


    Hi, I would like to remove the “Gobal” H1 tag (witch is the same across all pages) to be able to have unique H1 on each pages… but did not find yet on how to hide this “global” H1 tag
    <h1 class="site-title"><a href="https://wesitecom/" rel="home">This is the Global H1 I would like to hide</a></h1>

    thank’s for the help
    JB

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi JB,

    The quickest and easiest method for hiding your site title you be to use CSS to do so. Give the following bit of code a try inside of your theme customizer ‘Additional CSS’ section.

    Example:

    .site-title {
       display: none;
    }
    Thread Starter jbgglgdev

    (@jbgglgdev)

    Hi Evan, I did that but still have that same H1 all over the site :
    <h1 class="site-title"><a href="https://wesite.com/" rel="home">This is the Global H1 I would like to hide</a></h1> I forgot to tell tat this H1 is not visible to users…
    JB

    Do you want the h1 removed from the markup altogether, or are you just trying to hide it from being visible? The CSS provided above should make it invisible to the sites users.

    • This reply was modified 7 years, 6 months ago by Evan Herman.
    Thread Starter jbgglgdev

    (@jbgglgdev)

    I would like to remove from the markup, so that way I can add unique H1 on each page, witch is good for SEO
    here is the markup :
    <body data-rsssl=1 class=”home page-template-default page page-id-156 wp-custom-logo fl-builder custom-header-image layout-one-column-wide”><div id=”page” class=”hfeed site”>Passer au contenu <header id=”masthead” class=”site-header” role=”banner”><div class=”site-header-wrapper”><div class=”site-title-wrapper”>my alt text<h1 class=”site-title”>my title to remove</h1><div class=”site-description”>my description

    Hi @jbgglgdev,

    This has been addressed in an upcoming release of Primer, which was brought to our attention by another user. Feel free to take a look at the pull request for what is to come https://github.com/godaddy/wp-primer-theme/pull/205.

    In the meantime, if you want to remove the h1 tag from the markup altogether, your best bet is to create a custom child theme and work off of that so you can override the page-title.php template file where the <h1> tag is being generated.

    This would allow you to include your own page-title.php file, and remove the h1 tag altogether from this file, thus preventing it from ever being rendered on the page or included in the markup.

    Outside of that, I would recommend holding off for the next release of primer which is going to only wrap the site title in an h1 on the home page. All subsequent pages will be wrapped in a <div> with the current page (or blog or WooCommerce product) title wrapped in the <h1> to improve the SEO of Primer.

    Evan

    Thread Starter jbgglgdev

    (@jbgglgdev)

    great news Evan ! many thank’s to you.
    I will wit for next release then.
    All the best
    JB

    • This reply was modified 7 years, 6 months ago by jbgglgdev.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove the Gobal H1’ is closed to new replies.