# How to add an automatic table of content (TOC) to blog post in wix

**URL:** <https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802>\
**Category:** Ask the community\
**Tags:** wix-blog, code, question\
**Created:** [May 23, 2022, 4:26am UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802 "2022-05-23T04:26:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivi-pandey](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/shivi-pandey/32/21524_2.png) [@shivi-pandey](https://forum.wixstudio.com/u/shivi-pandey)\
**Post date:** [May 23, 2022, 4:26am UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/1 "2022-05-23T04:26:13Z")

</div>

In wix blog i wish to add an automatic table of content (toc) of Headings and SubHeadings so as to make my blog readable. Here are few examples

(1) [https://help.wixanswers. com/kb/en/article/getting-started-with-your-knowledge-base-articles](https://help.wixanswers.com/kb/en/article/getting-started-with-your-knowledge-base-articles) (left sidebar)  
(2) [https://advanced-js.github. io/syllabus/](https://advanced-js.github.io/syllabus/) (right sidebar)

The second one also provides the javascript code that enables this (https://www.jqueryscript. net/menu/Sidebar-Table-Of-Contents-Generator-with-jQuery-and-Bootstrap-Bootstrap-Toc.html)

Is it possible to put this above javascript code into the wix blog post so that a sidebar can be used to automatically generate a table of content based on the headings/subheadings of the blog post ? If so can someone show me how?

Thanks  
SP

---

<div class="post-metadata">

**Author:** ![roba82587](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/roba82587/32/32395_2.png) [@roba82587](https://forum.wixstudio.com/u/roba82587)\
**Post date:** [May 23, 2022, 8:37pm UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/2 "2022-05-23T20:37:38Z")

</div>

Hello from the Wix DevRel Team!

I don’t think there’s any way to reuse the jQuery code that you’ve linked above, but you can easily write something similar using Velo’s [children](https://www.wix.com/velo/reference/$w/page/children) method within the Page API. You should be able to write a function that loops through the children elements after the page has loaded and populates the sidebar based on the parameters you’re looking for (in this case, headers of a certain type, probably h2 or h3).

Hope this helps!

Rob

---

<div class="post-metadata">

**Author:** ![shivi-pandey](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/shivi-pandey/32/21524_2.png) [@shivi-pandey](https://forum.wixstudio.com/u/shivi-pandey)\
**Post date:** [May 24, 2022, 3:29am UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/3 "2022-05-24T03:29:00Z")

</div>

Hi, thanks. I wish i knew how 🙂 If you know how to do this then please share some code sample that i can use. Please email me or DM me if you can help me with this. Appreciate it.

---

<div class="post-metadata">

**Author:** ![viptechconsulting](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/viptechconsulting/32/38150_2.png) [@viptechconsulting](https://forum.wixstudio.com/u/viptechconsulting)\
**Post date:** [July 20, 2023, 1:46am UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/4 "2023-07-20T01:46:36Z")

</div>

Make NOT SENSE at all… in the year 2023 still WIX has no way to make a table of contents unless you make the anchor text ONE BY ONE… please update.

---

<div class="post-metadata">

**Author:** ![Steven\_Grella](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Steven\_Grella](https://forum.wixstudio.com/u/Steven_Grella)\
**Post date:** [August 13, 2023, 2:39pm UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/5 "2023-08-13T14:39:49Z")

</div>

Completely agree! The blog feature is stuck in the stone age! Considering moving to wordpress to gain more autonomy over my page. Wix blog looks so ugly compared to others! Frustrated.

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [March 3, 2026, 12:37pm UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/6 "2026-03-03T12:37:54Z")

</div>

For anyone passing by, I recently shared a guide on how to create your own Table Of Contents for Wix Blog, by reading the contents, parsing the data, and then constructing your headings.

> [@How to Build a Dynamic Sticky Table of Contents for Wix Blogs in Wix Studio](https://forum.wixstudio.com/t/how-to-build-a-dynamic-sticky-table-of-contents-for-wix-blogs-in-wix-studio/76693):
>
> Have you ever scrolled through a long, insightful blog post and wished you could quickly jump to a specific section? While the Wix Blog is powerful, it doesn’t currently offer a native sticky Table of Contents (TOC). In this topic, we’ll build a dynamic, auto-generating, and sticky TOC that reads your blog headings and indents them based on their hierarchy.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/system/32/86885_2.png) [@system](https://forum.wixstudio.com/u/system)\
**Post date:** [April 2, 2026, 12:38pm UTC](https://forum.wixstudio.com/t/how-to-add-an-automatic-table-of-content-toc-to-blog-post-in-wix/41802/7 "2026-04-02T12:38:16Z")

</div>

Closed on April 2, 2026, 12:38pm UTC

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