LDHyperlink
custom wordpress plugin
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/ldusoswa/text-hyperlinker/archive/refs/heads/main.zipLDHyperlink WordPress Plugin
A WordPress plugin that automatically hyperlinks text matching your site's categories and tags.
Description
LDHyperlink automatically scans your post content and converts any text that matches your WordPress categories or tags into clickable hyperlinks. This helps improve internal linking and SEO by automatically creating connections between related content.
Features
- Automatic Linking: Automatically converts category and tag names into links
- No Configuration Required: Works out of the box
- SEO Friendly: Improves internal linking structure
- Lightweight: Minimal performance impact
Installation
Via WordPress Admin (Recommended)
- Run the build command:
.\build.ps1 - Upload the generated zip file from the
dist/folder via WordPress Admin > Plugins > Add New > Upload Plugin - Activate the plugin through the 'Plugins' menu in WordPress
- The plugin will automatically start hyperlinking matching text in your posts
Manual Installation
- Upload the
ldhyperlink.phpfile to the/wp-content/plugins/ldhyperlink/directory - Activate the plugin through the 'Plugins' menu in WordPress
- The plugin will automatically start hyperlinking matching text in your posts
Building for Distribution
To create a zip file for manual upload:
.\build.ps1
This will create a ldhyperlink-1.0.zip file in the dist/ directory that you can upload via the WordPress admin interface.
How It Works
The plugin hooks into WordPress's the_content filter and:
- Retrieves all categories and tags from your site
- Scans post content for matching text
- Replaces matches with hyperlinked versions pointing to the respective category/tag archive pages
Example
If you have a category called "Sim Racing" and a post contains the text "Sim Racing", it will automatically be converted to a link pointing to your Sim Racing category archive.
Technical Details
- Hook: Uses WordPress
the_contentfilter - Taxonomies: Works with both categories (
category) and tags (post_tag) - Version: 1.0
Requirements
- WordPress 4.0 or higher
- PHP 5.6 or higher
Author
Laurence Dusoswa
License
GPL v2 or later
Support
For issues or questions, please open an issue on the GitHub repository.