Kntnt Anchor Links
WordPress plugin that adds anchor links to headings.
by Thomas Barregren · github.com/kntnt/kntnt-anchor-links · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kntnt/kntnt-anchor-links/archive/refs/heads/main.zipFrom the readme
Kntnt Anchor Links
WordPress plugin that adds anchor links headings.
Description
This plugin automatically adds a link icon to the left of headings. The icon only appears when hovering headings. The icon is an anchor link to the current headline.
Visitors can copy the link, either by right-clicking on the icon and choosing "copy link" or by clicking on the link and then copying the URL in the browser's address bar. They can then use the copied URL to navigate directly to the location of the headline.
The technical explanation is that the plug-in adds an anchor element inside the header. The anchor element contains the icon and gets an id which is a machine readable version of the header. This makes it possible to use the id as a fragment in a URL. The anchor element also gets a href attribute with a URL to the page using the id as a fragment.
By default, only H2 in posts get these anchors, but this can be changed by implementing filters.
Filters
By default, the plugin ads anchor links only to H2 elements in posts.
You can change heading levels by implementing the filter kntnt-anchor-links-headinglevels:
You can change post types by implementing the filter kntnt-anchor-lin
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.