Create a table of contents for your website using wordpress with Easy Table of Contents

🔧 Step 1: Install the Plugin

  1. Go to WordPress Dashboard → Select PluginsAdd New.
  2. Type “Easy Table of Contents” in the search bar.
  3. Click Install Now → After installation, select Activate.

⚙️ Step 2: Configure the Table of Contents

  1. Go to SettingsTable of Contents.
  2. In the General tab:
    • Enable Support: Choose the post types where the table of contents will appear (Posts, Pages, Custom Post Types).
    • Auto Insert: Select where to automatically insert the table of contents (e.g., post, page).
    • Position: Choose where to display (Top, Bottom, Before first heading…).
  3. In the Appearance tab:
    • Width: Set the table width.
    • Title: Customize the table of contents title (e.g., “Table of Contents” or “Content Summary”).
    • Theme: Choose a theme (Grey, Light Blue, White…).
  4. In the Advanced tab:
    • Heading Levels: Choose which heading tags to display (H1, H2, H3…).
    • Smooth Scroll: Enable smooth scrolling.
    • Hierarchical View: Display in hierarchical format.

🏷️ Step 3: Manually Insert the Table of Contents (Optional)

You can manually insert the table of contents using this shortcode:

[ez-toc]

📝 Step 4: Customize CSS (Optional)

To personalize the design, go to AppearanceCustomizeAdditional CSS and add custom code. Example:

#ez-toc-container {
    background-color: #f0f8ff;
    border: 1px solid #007bff;
    padding: 15px;
    border-radius: 10px;
}

Step 5: Test and Finalize

  • Check if the table of contents appears correctly on a post.
  • Adjust the settings if necessary.