Title: Incorrect depth count
Last modified: January 12, 2023

---

# Incorrect depth count

 *  Resolved [Besthand](https://wordpress.org/support/users/soft4fun/)
 * (@soft4fun)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/incorrect-depth-count/)
 * I use H4 as the main paragraph title, H5 as the sub-title, but the following 
   case will cause incorrect TOC structure in front page.
 * EX:
 *     ```wp-block-code
       <h4> This is main paragraph </h4>
       <h5> sub-title 1</h5>
       <h5> sub-title 2</h5>
       <h4> This is another main paragraph </h4>
       ```
   
 * If correct, the TOC shows like:
    - This is main paragraph
       * sub-title 1
       * sub-title 2
    - This is another main paragraph
 * but it shows:
    - This is main paragraph
       * sub-title 1
          - sub-title 2
          - This is another main paragraph
 * How do I fix this problem?
 * Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Besthand](https://wordpress.org/support/users/soft4fun/)
 * (@soft4fun)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/incorrect-depth-count/#post-16365523)
 * This forum seems cant’t show correct level of list, please refer this image:
 * [https://imgur.com/uwW5e7j](https://imgur.com/uwW5e7j)
 *  Plugin Author [WPJoli](https://wordpress.org/support/users/wpjoli/)
 * (@wpjoli)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/incorrect-depth-count/#post-16367146)
 * Hello,
 * Thank you for reporting this.
 * For now, the algorythm works best when the structure of the headings is following
   the W3C standards.
 * The title of the page should always be H1 (only one H1), followed by H2, H3 and
   so on, but skipping headings ranks is not considered best practice and it is 
   best for SEO to keep a W3C compliant structure.
 * Please refer to this link: [https://www.w3.org/WAI/tutorials/page-structure/headings/](https://www.w3.org/WAI/tutorials/page-structure/headings/)
 * > Skipping heading ranks can be confusing and should be avoided where possible:
   > Make sure that a `<h2>` is **not** followed directly by an `<h4>`, for example.
 * However, I understand the TOC should keep the proper structure even if it does
   not follow the standards, and I will have this fixed for the next update.
 * In the mean time there is nothing to do if you want to keep your headings this
   way. Otherwise, changing your headings and starting from H2 will fix this.
 * Thank you!
 *  Plugin Author [WPJoli](https://wordpress.org/support/users/wpjoli/)
 * (@wpjoli)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/incorrect-depth-count/#post-16376167)
 * Hello,
 * The heading level issue when not starting from H2 has been resolved in 2.0.3.
 * Please update to the latest version and let me know.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Incorrect depth count’ is closed to new replies.

 * ![](https://ps.w.org/joli-table-of-contents/assets/icon-256x256.png?rev=3487088)
 * [Joli Table Of Contents](https://wordpress.org/plugins/joli-table-of-contents/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/joli-table-of-contents/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/joli-table-of-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/joli-table-of-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/joli-table-of-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/joli-table-of-contents/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [WPJoli](https://wordpress.org/support/users/wpjoli/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/incorrect-depth-count/#post-16376167)
 * Status: resolved