Fixing Anchor Link Issues in Easy Table of Contents
Content
Anchor links are the core functionality of any table of contents plugin, allowing users to jump to specific sections on a page. However, users of the Easy Table of Contents plugin sometimes report that these links stop working correctly. This can happen after an update, when using non-Latin characters, or due to conflicts with other elements on a site.
Based on community reports, here are the most common causes and their solutions.
Why Do Anchor Links Break?
Anchor link issues typically fall into a few categories:
- Plugin Updates: Major updates can change how anchors are generated, breaking existing links.
- Special Characters: Headings containing characters like &, :, –, or — can prevent anchor creation.
- Character Encoding: Headings in Cyrillic, Japanese, or other non-Latin scripts may not generate anchors as expected.
- Theme or Plugin Conflicts: JavaScript from other plugins or themes can interfere with the smooth scroll functionality.
- Incorrect Scroll Position: The page might scroll, but not to the correct spot, often due to lazy-loaded images or fixed headers.
Common Solutions for Anchor Problems
1. Regenerate Link IDs After an Update
If anchors stopped working after a plugin update, a settings change may resolve it.
- Navigate to Settings > Table of Contents in your WordPress admin.
- Scroll down to the Advanced settings section.
- Locate the option labeled Generate TOC link ids or similar.
- Enable this option and save your settings.
- Clear any caching plugins you have running on your site.
- Test the links again.
2. Handle Special and Non-Latin Characters
The plugin's handling of characters has evolved. If you need consistent, Latin-based anchors for non-Latin text (like Russian or Japanese), you may need to use a filter or consider a third-party transliteration solution, as this functionality is not built directly into the plugin's core settings.
3. Disable Smooth Scrolling
If the page scrolls to the wrong position, the Smooth Scroll feature might be conflicting with other page elements.
- Go to Settings > Table of Contents.
- Find the Smooth Scroll option (often in the Advanced section).
- Disable this feature.
- Save changes and test your page.
4. Perform a Conflict Test
Many issues are caused by conflicts with other plugins or your theme.
- Switch Themes Temporarily: Activate a default WordPress theme like Twenty Twenty-Four. If the anchors work, the issue is with your theme.
- Deactivate Plugins: Deactivate all other plugins except Easy Table of Contents. If the anchors work, reactivate your plugins one by one to identify the culprit. Pay special attention to optimization, lazy load, or other content-altering plugins.
Need More Help?
If these steps don't resolve your issue, the best way to get help from the community is to provide specific details. When asking for support, be sure to include:
- The URL of the page where the problem occurs.
- The exact text of a heading that isn't working.
- A list of your active plugins and your theme name.
Related Support Threads Support
-
Conflict with wp-Typographyhttps://wordpress.org/support/topic/conflict-with-wp-typography/
-
Problem with inserting anchor divshttps://wordpress.org/support/topic/problem-with-inserting-anchor-divs/
-
Checkbox Ensure anchors are in lowercase not workinghttps://wordpress.org/support/topic/checkbox-ensure-anchors-are-in-lowercase-not-working/
-
Widget does not auto highlighthttps://wordpress.org/support/topic/widget-does-not-auto-highlight/
-
Not all links are moving to headershttps://wordpress.org/support/topic/not-all-links-are-moving-to-headers/
-
The default anchor prefix is not applied.https://wordpress.org/support/topic/the-default-anchor-prefix-is-not-applied/
-
anchors and ‘&’ characterhttps://wordpress.org/support/topic/anchors-and-character/
-
[WP JSON API] bug : no anchor in h1,h2,h3,…https://wordpress.org/support/topic/wp-json-api-bug-no-anchor-in-h1h2h3/
-
Inaccurate jumpshttps://wordpress.org/support/topic/inaccurate-jumps/
-
Jump links for extremely many h3:shttps://wordpress.org/support/topic/jump-links-for-wxtremely-many-h3s/
-
Return support to the old type of anchors: #i-2, #i-3, #i-n..https://wordpress.org/support/topic/return-support-to-the-old-type-of-anchors-i-2-i-3-i-n/
-
404 errors becauses # are replaced by _https://wordpress.org/support/topic/404-errors-becauses-are-replaced-by-_/
-
Anchors not working when smooth scroll higher than 30pxhttps://wordpress.org/support/topic/anchors-not-working-when-smooth-scroll-higher-than-30px/
-
Issues after updating: H2 / H3 titles disappearedhttps://wordpress.org/support/topic/issues-after-updating-h2-h3-titles-disappeared/
-
how to change “Default Anchor Prefix”https://wordpress.org/support/topic/how-to-change-default-anchor-prefix-2/
-
the anchor text can’t scroll down the proper positionhttps://wordpress.org/support/topic/the-anchor-text-cant-scroll-down-the-proper-position/
-
Lighthouse – Links are not crawlablehttps://wordpress.org/support/topic/lighthouse-links-are-not-crawlable/
-
Cyrillic anchors to transliterationhttps://wordpress.org/support/topic/cyrillic-anchors-to-transliteration/
-
Jump anchors on new headings not workinghttps://wordpress.org/support/topic/jump-anchors-on-new-titles-not-working/
-
Last update broke all anchorshttps://wordpress.org/support/topic/last-update-broke-all-anchors/
-
Anchors not working properlyhttps://wordpress.org/support/topic/anchors-not-working-properly/
-
Anchor link is not workinghttps://wordpress.org/support/topic/anchor-link-is-not-working/
-
Anchor links , scrolling not working….https://wordpress.org/support/topic/anchor-links-scrolling-not-working/
-
Anchors have changedhttps://wordpress.org/support/topic/anchors-have-changed/
-
Some anchors are not working since last updatehttps://wordpress.org/support/topic/some-anchors-are-not-working-since-last-update/
-
If I repeat a header the anchor does not workhttps://wordpress.org/support/topic/if-i-repeat-a-header-the-anchor-does-not-work/
-
New Errorshttps://wordpress.org/support/topic/new-errors-5/
-
URL anchorshttps://wordpress.org/support/topic/url-anchors/
-
Some Links Not Workinghttps://wordpress.org/support/topic/some-links-not-working-2/
-
New Update – Anchors don’t work anymorehttps://wordpress.org/support/topic/new-update-anchors-dont-work-anymore/
-
No anchors :( by shortcodehttps://wordpress.org/support/topic/no-anchors/
-
H2 jumplink no longer workinghttps://wordpress.org/support/topic/h2-jumplink-no-longer-working/