Easy Table of Contents

Shortcode

Version: 1.0.2

Shortcode

Place {easy_toc} or {toc} where the outline should appear. Optional attributes override plugin defaults for that article. Use double quotes around values.

{easy_toc}
{toc}
{easy_toc layout="numbered" theme="bold" title="Contents"}
{easy_toc layout="compact" theme="minimal" sticky="1" scroll_spy="1"}
{easy_toc collapsible="1" collapsed="0" title="Quick links"}

Common attributes:

  • layout: list, flat, numbered, compact, cards
  • theme: classic, soft, bold, minimal, glass
  • title, show_title
  • sticky, scroll_spy, smooth_scroll, scroll_offset
  • collapsible, collapsed, back_to_top
  • min_level, max_level, min_headings

For mid-article placement, write a short lead, then insert the shortcode, then continue with H2 sections. Set Insert Position to None when every TOC should come from a shortcode only.