• Resolved xhat

    (@xhat)


    Hello,

    There is a very important feature I’d like to request – is to exclude specific characters from being included in the anchor tag ID, in my case it is numbers, but I would also need those numbers to be excluded only when they are NOT sub-heading.

    Example:

    <h2>#1 - great title</h2>
    <h2>#2 - awesome title</h2>
    <h2>#3 - incredible title</h2>
    <h2>#4 - best title</h2>

    This will generate the following:

    ...<span class="ez-toc-section" id="1_great_title">...
    ...<span class="ez-toc-section" id="2_awesome_title">...
    ...<span class="ez-toc-section" id="3_incredible_title">...
    ...<span class="ez-toc-section" id="4_best_title">...

    I would like to exclude those numbers from being included in the ID, because those titles are not subheading.

    So the result would be:

    ...<span class="ez-toc-section" id="great_title">...
    ...<span class="ez-toc-section" id="awesome_title">...
    ...<span class="ez-toc-section" id="incredible_title">...
    ...<span class="ez-toc-section" id="best_title">...

    Would that be possible? Please do let me know!

    Thanks!

    • This topic was modified 5 years ago by xhat.
    • This topic was modified 5 years ago by xhat.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Steven

    (@shazahm1hotmailcom)

    You can use the ez_toc_url_anchor_target to customize/modify the anchors as you need.

    I hope this helps!

    Thread Starter xhat

    (@xhat)

    Perfect, thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude numbers when generating anchor tag ID’ is closed to new replies.