changing screen-reader-text class of post navigation to h6 from h1

Home Forums Support changing screen-reader-text class of post navigation to h6 from h1

Home Forums Support changing screen-reader-text class of post navigation to h6 from h1

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #50204
    michael

    First off, thanks for a great theme.
    In a single-post I’d like to modify the nav menu that lets you go to previous/next post.
    The names of the posts are contained in an h1. This might be an SEO issue (or not).
    I cant find where these h tags are generated. in single-content.php i have <?php generate_content_nav( ‘nav-below’ ); ?> but where is this function? i cant find it in functions.php (or anywhere else).
    could you point me in the right direction? Again, the goal is to change the h1 tag nested in <nav id=”nav-below” class=”post-navigation” role=”navigation”> to an h6 or a span tag.

    thanks

    #50351
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Good point – GP was built on a skeleton provided by WordPress.org developers, and they had that tag set to be an h1 – it has something to do with screen readers for when blind users use your website.

    I’ve gone ahead and changed this to an h6 in the next version, as I do believe search engines only like one h1 on each page.

    If you’d like to change this right now, you can find it on line 76 of /generatepress/inc/template-tags.php

    Thanks!

    #205079
    Tlumacz

    I just changed it – in my template it was to modify <h1> in 2 files: content.php and functions.php. Maybe someone will look for this (my template name is itransform). In my opinion its better not to change into <h6>. <h2> would be more suitable , even if duplicated regarding SEO.<h2> is far more important than <h6>
    Tlumacz

    #373001
    Natalia

    Hello, I want to recover this ticket because I have observed a problem with the tag h6 of class = “post-navigation”. I suggest removing that tag because it has no consistency. To add a h6 tag, there must be h5, h4, h3, h2, and h1 first. I suggest removing it completely. Also, if you look at it, the text is not currently displayed. Thank you.

    Hola, quiero recuperar este ticket porque he observado un problema con la etiqueta h6 de class=”post-navigation”. Sugiero quitar esa etiqueta, porque no tiene coherencia. Para añadir una etiqueta h6, tiene que haber primero h5, h4, h3, h2 y h1. Sugiero retirarla completamente. Ademas, si te fijas, ni siquera se muestra el texto actualmente. Gracias.

    #373047
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That element is now a <span> in GP 1.4 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.