Incorrect header title hiearchy

This topic has 3 replies, 1 voice, and was last updated 5 years, 6 months ago by Spiracle Themes.

Viewing 3 reply threads
  • Author
    Posts
    • #1300


      Mark
      Guest

      <div class=”section-title page-title”>
      I am using Krystal Business, which is a child theme of Krystal.

      When I started building post types (blog posts and project posts), I noticed the title inside the post itself is a H3 instead of H2.

      In the header where the header image is located, the post title is H1, then below in the content the title is repeated and made an H3 instead of H2. This jump from H1 to H3 is out of sequence.

      Here is the HTML

      Header Image Area

      <h1 class="main-title"></h1>

      Page Title (in page content area)

      <div class="blog-content">
      <div class="heading">
      <h3>Title Name</h3>

      Essentially, the “blog-content” > “heading” should be a H2, following the hierarchy of H tags.

      I know a temporary fix is to remove the “H3” title with “display:none”, so I am aware of that method to make a change, but I wanted to ask, is there a reason for jumping the hierarchy line from H1 to H3 like that?

    • #1304


      Spiracle Themes
      Guest

      Hi Mark,

      Reason for this is the design. An H2 tag has a higher font size which will not look good visually on the page, therefore H3 has been used to keep the aesthetics. You see H1 tag is essential for Search engine crawlers to get the page information, therefore, it is used there.

      Best Regards

    • #1311


      Mark
      Guest

      I thought so, and I understand the theme is designed to serve the masses who generally don’t have coding skills, but since I do have coding skills, and can alter header tags font size using Custom CSS, this “font-size” is not an issue for me.

      Saying that, is it possible, with the design of this theme, to copy the specific PHP file to the child theme folder and alter any PHP to make the page title H2 instead?

      If so, which file is it that controls the page header tag designation?

      or

      What PHP coding do I copy from which file to insert into the child theme functions.php file so I can alter the header designation there?

      Thanks

    • #1312


      Spiracle Themes
      Guest

      Hi Mark,

      To change the Headings order, You need to copy the content.php and content-gallery.php (located in template-parts of the theme root folder) and copy to the same location in the child theme ie inside the template-parts folder, and change the Headings tags there.
      You will see that your headings are in the order you have specified there.

      Best Regards

Viewing 3 reply threads

Reply To: Incorrect header title hiearchy

Your information: