Are you looking for a way to add sticky table of contents in Elementor? In this tutorial, we will see how you add a table of contents in the sidebar using the free Elementor widget.
Google loves long-form content. The statistics show that long-form content performs better and ranks higher in search engine results. But, the strange truth is that the material is not consumable in the long form.
We need to break it into small pieces and guide the readers precisely in the article. This is why most people use a table of contents in long-form articles.
Let us see the different ways to add a sticky table of contents in Elementor.
Adding a sticky table of contents in Elementor
Here we will see two methods of adding a sticky table of contents in Elementor posts and pages.
But before jumping into the actual techniques, we would like to inform you that this tutorial will help you add a sticky table of contents in the sidebar.
Why sticky table of contents in the sidebar?
If the table summary is at the start of the article, readers can have a glimpse of the article before starting it. But if the table of content is in the sidebar, readers have a clear idea of where exactly they are on the post and how far they’ve read the article.
Let us see the methods:
Using Elementor Pro:
In case you’ve Elementor Pro, then adding a table of contents in the sidebar is very easy. You can simply follow the below steps:
- To begin with, you can create a two-column section
- Add the main content like headings, text, etc. on the left side.
- Add a Table of contents widget on the right-side column.
- Click on Edit Table of contents > Advanced > Sticky > Top
- You can select the options to display sticky on Desktop, tablet, or mobile.
This is the easiest way to add sticky table of contents in Elementor if you have many posts/pages.
Get started with table of contents from Elementor Pro.
Using free Elementor Plugin:
In the case of the free Elementor plugin, you might be using the Table of contents widget from some Elementor Addons plugins.
Similar to the first case, add the TOC widget in the right column. To make this widget sticky, add a CSS class to this widget from the advanced settings.
I’ll name it ‘toc-sticky‘
Now, add a class name to the column like ‘parent-sticky‘
The classes need to be added from the advanced settings, i.e, Advanced > CSS classes.
After adding the classes, add the below CSS code in the Column’s Advanced tab > Custom CSS. You can also add this to the theme’s customizer CSS option.
Save the post/page after following the above steps. This will make the table of contents sticky in the sidebar, and the content on the left side will be scrollable.
The above steps can be applied to any widget, and it is not specific to TOC. You can create a sticky CTA button or an image in the sidebar.
I hope this tutorial has helped you. If you’re looking for many advanced features for your website, then we recommend going for Elementor Pro, because it will save you a lot of time to customize the site quickly.