How to hide H4 and below in the outline in Obsidian?

While the outline feature of the core plugin is convenient for displaying headings, it shows all the way down to small headings, making it a bit lengthy. How can I prevent it from displaying H4 and below? I couldn’t find such an option in the settings.

If there’s a solution or a plugin for this, please let me know. thank you.

You’ll have to use a custom CSS snippet with the following code to hide H4 and downwards from the Outline pane:

.workspace-leaf-content[data-type="outline"] {
  .tree-item .tree-item .tree-item .tree-item {  display: none; }

NOTE: this will not work if you have skipped H tag levels - if you want to hide H4 downwards, you must make sure you have used H1, H2 and H3 beforehand.

It works.
Thank you.

1 Like