Site logo

[Resolved] Too many h1 tags on homepage, Custom location for block element, content templat

Home Forums Support [Resolved] Too many h1 tags on homepage, Custom location for block element, content templat

Home Forums Support Too many h1 tags on homepage, Custom location for block element, content templat

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1907892
    Ted

    I have four questions here:

    1. I’m getting reports from my SEO app and google that I have too many H1 tags on the homepage. The homepage uses When I inspect, the only h1 I find is the site title. I’m not sure if the problem is coming from a hook or what. Ideas?

    2. I would like to display block elements in custom locations within my posts. The hook locations all seem to fall just at the beginning of the post or just at the end. I’m hoping to insert them within the post. Is there an easy way to create a custom location. For example, can you create a shortcode for a particular block element that could be inserted at the exact location in the post where you’d like the block element to appear?

    3. In the blog listings on the front page and category archive pages, I’m getting a strange half image of the first blog post in all the blog listings (currently “SM57 vs SM58”). I’ve created a content template element for these, but I don’t understand what has happened to the first post listing image.

    4. I currently use the dynamic background image for the archive and home pages blog listing. This is a small thing, but I would like to be able to click on the image itself and have that link to the post rather than needing to have a “read more” button on the image. Is there a way to link the background image directly to the post?

    My site is here:

    https://thegreatestsong.com

    All best

    #1908223
    David
    Staff
    Customer Support

    Hi there,

    if you can raise a separate topic for each of your questions, it will make it easier for us to resolve each of them, and in the future you will be able to find those answers more easily.

    #1 The Theme will automatically add the H1 tag to the Site Title to the front page when its set to display the Latest Posts. You can change that by adding this PHP Snippet:

    add_filter( 'generate_site_title_output', function( $output ) {
        return sprintf(
            '<p class="main-title" itemprop="headline">
                <a href="%1$s" rel="home">
                    %2$s
                </a>
            </p>',
            esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
            get_bloginfo( 'name' )
        );
    });

    How to add PHP: https://docs.generatepress.com/article/adding-php/

    #1908255
    Ted

    Thanks for your reply! Yes, no problem. I’ll make separate topics.

    About Number 1, I would like the site title as the only H1 on the homepage. I don’t need to change that. But I can’t figure out where the other H1s are coming from. All the blog post titles are h2 or lower. ??

    All best,
    Ted

    #1908259
    David
    Staff
    Customer Support

    You can ignore the 2x H1’s – they are both the Site Title, one is displayed in the Desktop Navigation and the other is in the Mobile Header. So thats acceptable as only one of them is ever displayed.

    #1908274
    Ted

    Many thanks!

    #1908275
    Ted

    resolved

    #1908293
    David
    Staff
    Customer Support

    You’re welcome

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