• Hi,

    Sometimes I get the same h1 and h2. Though I don’t generate toc for h1, but it jumps to h1 by default as it’s the first anchor.

    Is there a filter to disable the plugin to auto-generate anchor for h1. Most of the time h1 anchor is useless.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Marc Toensing

    (@marcdk)

    You can exclude the heading levels in the sidebar menu of Gutenberg. Does that help? Look at the screenshots of the plug-in here.

    Plugin Author Marc Toensing

    (@marcdk)

    Thread Starter tolddsm

    (@tolddsm)

    Hi Marc,

    It’s turned off, I only show h2s in TOC. For your information, the min and max level are all “including h2″

    The problem is the heading #ID is automatically added to all heading with the plugin activated.

    My problem is :

    The content:

    h1 id=”i-love-a” I love a
    h2 id=”i-love-b” I love b
    h2 id=”i-love-c” I love c
    h2 id=”i-love-a” I love a

    The TOC:
    h2 id=”i-love-b” I love b
    h2 id=”i-love-c” I love c
    h2 id=”i-love-a” I love a

    If I click I love a, it jumps to the h1 instead of the h2 as h1 ID is auto-generated.
    I want to disable all IDs generated to h1.

    Thanks

    • This reply was modified 2 years, 1 month ago by tolddsm.
    Plugin Author Marc Toensing

    (@marcdk)

    Okay, I understand. Currently, the only way is to set a custom id in gutenberg for that heading, since SimpleTOC does not check for duplicated ids. Maybe this will be addressed in the future.

    Plugin Author Marc Toensing

    (@marcdk)

    Set it here in the Gutenberg heading block: https://ibb.co/M6jRFJw

    Thread Starter tolddsm

    (@tolddsm)

    Yes it can be a quick workaround.

    since SimpleTOC does not check for duplicated ids.
    I wonder how many people actually use h1 anchors, just adding a filter to disable h1 output is enough. Please consider this if possible.

    Anyways, thanks for your time looking into this!

    Plugin Author Marc Toensing

    (@marcdk)

    No, the filter would not be enough. The user can name two headlines the same and the resulting anchor id would be equal as well.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable anchor generated for h1’ is closed to new replies.