Home › Forums › Support › Too many h1 tags on homepage, Custom location for block element, content templat
- This topic has 6 replies, 2 voices, and was last updated 4 years, 8 months ago by
David.
-
AuthorPosts
-
August 25, 2021 at 6:28 am #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:
All best
August 25, 2021 at 8:53 am #1908223David
StaffCustomer SupportHi 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/
August 25, 2021 at 9:14 am #1908255Ted
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,
TedAugust 25, 2021 at 9:17 am #1908259David
StaffCustomer SupportYou 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.
August 25, 2021 at 9:28 am #1908274Ted
Many thanks!
August 25, 2021 at 9:29 am #1908275Ted
resolved
August 25, 2021 at 9:36 am #1908293David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.