Dynamic Blog Page H1 title

Hey team,

Question.

If I set a page as static blog page, it doesn’t show the H1 on the page where all posts are listed.

Now I know I can set the blog title like “The Blog” as H1, but if there are more than 1 page with listings each page will have that title and I get Semrush issues like : pages with duplicate H1 title.

Is there a way to get for example the page number and maybe even the amount of results in the H1 per page so each page with have a different H1?

If it is possible it could be solution, if there is no fix readily available, no problem, but could you maybe point me in the direction where to look in to?

Cheers Q

Hey Q,

I believe you’re using Renew as the Header Landmark where both the Blog Title and the Post Title are displayed and both are H1s.

If you have enabled the Output Logo Text in Hidden <H1> in Theme Options > Header, that would be 3 h1s in the single post page.

Multiple h1 tags in a page is perfectly valid in HTML5 which our theme uses. It won’t have a negative impact with regards to SEO. Here’s an explanation from Google Webmasters.

We understand that some users believe in third-party SEO tools though so if you wish to change the Blog Title tag, you can override the _landmark-header.php file which is located in the \wp-content\themes\x\framework\legacy\cranium\headers\views\renew folder. Change all instances of h1 tags.

If you don’t know how to override template files yet, please follow our customization guide at https://theme.co/apex/forum/t/customizations-best-practices/205

Hope that helps.

Hi,

No, you assumed wrong as I am also working for clients that use this theme. So it is exactly as I questioned.

Also It was not about having multiple H1 tags on a page or not, but each title tag needs to be unique… that was what the question is about.

Hey Q,

I’m sorry I didn’t get at first that you’re referring to paginated archive pages. Providing screenshots and specific URLs can be very helpful next time to avoid confusion though.

It’s technically possible to attach the blog page number to the blog title. It would look like this:

Below are the steps to achieve that:

  1. Since this would need customization, you need to first learn how to override template files of our theme. Here’s the guide: https://theme.co/apex/forum/t/customizations-best-practices/205

  2. Go to this directory in your WordPress install \wp-content\themes\x\framework\legacy\cranium\headers\views\(ethos, integrity, icon or renew)

  3. Copy the _landmark-header.php file

  4. Paste the file in the same folder structure in your child theme like \themes\x-child\framework\legacy\cranium\headers\views\(ethos, integrity, icon or renew). You need to create the folders if they don’t exist yet.

  5. Open the copied file in the WordPress Theme Editor or any text editor and do the following:

  6. Add this line under the variables section.

$paged = (is_paged() && get_query_var( 'paged', 1 ) !== 0 ) ? get_query_var( 'paged', 1 ) : 1;

7.) Add this code in the part that’s outputting the title under the is_home WordPress Conditional Tag

. " Page " . $paged

You might want to add the code in the last step to other conditional tags in the _landmark-header.php file also like in the is_tag() and is_category().

I will list this as feature request so it might be taken into consideration for future developments.

Hope that helps.

@christian_y

Yeah, you are definitely correct, I should add more context in the form of a URL or screenshot. (being a UX consultant as well, I should know better and practice what I preach :-))

Thank you so much for this explanation, going to try this.

Cheers Q

You’re welcome, Q.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.