{"id":2037,"date":"2022-09-28T14:28:03","date_gmt":"2022-09-28T14:28:03","guid":{"rendered":"https:\/\/tocwp.com\/docs\/?post_type=ht_kb&#038;p=2037"},"modified":"2025-11-28T07:53:01","modified_gmt":"2025-11-28T07:53:01","slug":"how-to-add-easy-table-of-contents-in-sidebar","status":"publish","type":"ht_kb","link":"https:\/\/tocwp.com\/docs\/knowledge-base\/how-to-add-easy-table-of-contents-in-sidebar\/","title":{"rendered":"How to Add Easy Table Of Contents in Sidebar"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this tutorial, we will show you how you can add the Easy Table Of Contents in the Sidebar by using 2 different ways.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/tocwp.com\/docs\/knowledge-base\/how-to-add-easy-table-of-contents-in-sidebar\/#The_first_way_to_add_TOC_in_the_sidebar_is_by_using_the_Shortcode\" >The first way to add TOC in the sidebar is by using the Shortcode.<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/tocwp.com\/docs\/knowledge-base\/how-to-add-easy-table-of-contents-in-sidebar\/#The_second_way_to_add_the_TOC_in_Sidebar_is_by_using_the_TOC_block\" >The second way to add the TOC in Sidebar is by using the TOC block.<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_first_way_to_add_TOC_in_the_sidebar_is_by_using_the_Shortcode\"><\/span>The first way to add TOC in the sidebar is by using the Shortcode.<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: <\/strong>Go to the Easy Table Of Contents settings under the Settings section which you will find in the dashboard on the left side of your window.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"475\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1024x475.png\" alt=\"\" class=\"wp-image-2040\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1024x475.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-300x139.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-768x356.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-50x23.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1536x712.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-60x28.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-100x46.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1.png 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: <\/strong>Now Scroll down to the bottom of the page and here you will find the shortcode &#8220;ez-toc&#8221;, copy the shortcode from there.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"438\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1024x438.png\" alt=\"\" class=\"wp-image-2041\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1024x438.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-300x128.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-768x328.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-50x21.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1536x656.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-60x26.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-100x43.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3.png 1900w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: <\/strong>Now go to Appearance > Widget, here you will find the Sidebar section of your theme<strong>.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"414\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-1024x414.png\" alt=\"\" class=\"wp-image-2045\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-1024x414.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-300x121.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-768x310.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-50x20.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-1536x620.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-60x24.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1-100x40.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_1-1.png 1550w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: <\/strong>Click on the &#8220;+&#8221; icon to add a shortcode block, paste the shortcode that you copied from the TOC settings section and click on Update<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"379\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-1024x379.png\" alt=\"\" class=\"wp-image-2047\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-1024x379.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-300x111.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-768x284.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-50x19.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-1536x569.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-60x22.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1-100x37.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_2-1.png 1550w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-1024x308.png\" alt=\"\" class=\"wp-image-2049\" width=\"506\" height=\"151\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-1024x308.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-300x90.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-768x231.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-50x15.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-60x18.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1-100x30.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/09\/Screenshot_3-1.png 1919w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-1024x476.png\" alt=\"\" class=\"wp-image-2148\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-1024x476.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-300x139.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-768x357.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-50x23.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-1536x714.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-60x28.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download-100x46.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/download.png 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_second_way_to_add_the_TOC_in_Sidebar_is_by_using_the_TOC_block\"><\/span>The second way to add the TOC in Sidebar is by using the TOC block.<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Adding the TOC in the sidebar using the TOC block is similar to adding the TOC using the Shortcode, you just have to use the TOC block instead of using the Shortcode and click on update.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"488\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-1024x488.png\" alt=\"\" class=\"wp-image-2149\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-1024x488.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-300x143.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-768x366.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-50x24.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-1536x732.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-60x29.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2-100x48.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_1-2.png 1720w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"459\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-1024x459.png\" alt=\"\" class=\"wp-image-2150\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-1024x459.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-300x134.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-768x344.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-50x22.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-1536x688.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-60x27.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2-100x45.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_2-2.png 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"477\" src=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-1024x477.png\" alt=\"\" class=\"wp-image-2151\" srcset=\"https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-1024x477.png 1024w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-300x140.png 300w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-768x357.png 768w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-50x23.png 50w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-1536x715.png 1536w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-60x28.png 60w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1-100x47.png 100w, https:\/\/tocwp.com\/docs\/wp-content\/uploads\/2022\/11\/Screenshot_3-1.png 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note: The output may appear differently based on the theme that you are using. <\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it for this tutorial!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We hope we\u2019ve cleared your doubts in case you have any feedback or questions, then please share them in the comments section below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will show you how you can add the Easy Table Of Contents in the Sidebar by using 2 different ways. The first way to add TOC in the sidebar is by using the Shortcode. Step 1: Go to the Easy Table Of Contents settings under the&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[4],"ht-kb-tag":[],"class_list":["post-2037","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-how-to"],"_links":{"self":[{"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/2037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/comments?post=2037"}],"version-history":[{"count":14,"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/2037\/revisions"}],"predecessor-version":[{"id":2630,"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/2037\/revisions\/2630"}],"wp:attachment":[{"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/media?parent=2037"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=2037"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/tocwp.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=2037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}