WP Manifestindependent plugin directory
manifest / content / cwp-frontend-post-anchorjs

Context AnchorJS

Transform WordPress elements into mid-page anchors using AnchorJS.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/robertandrews/cwp-frontend-post-anchorjs/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Context WP AnchorJS

Description

This WordPress plugin adds WordPress support for Bryan Braun's AnchorJS, a Javascript library that can add visual, mid-page anchor links to specified HTML elements.

AnchorJS examples

Installation

Add the plugin via Plugins > Add New > Add Plugins > Upload Plugin.

The plugin properly uses WordPress' wp_enqueue_scripts action to call two files:

  • AnchorJS (currently via CDN)
  • Your settings file

Usage

The settings file is where you specify which HTML elements to convert into visual anchors, whether to include hover links, which icons etc.

See AnchorJS settings in AnchorJS docs.

settings.js ships containing: anchors.add('article h3');

This turns <h3> elements into anchor links.

You can change the settings using AnchorJS' supported settings.