Mai Link Injector
A programmatic plugin to automatically link keywords to any url.
by BizBudding · github.com/maithemewp/mai-link-injector · 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/maithemewp/mai-link-injector/archive/refs/heads/main.zipFrom the readme
Mai Link Injector
A plugin to automatically link keywords to any url. Settings page requires Mai Theme or ACF Pro.
How it works
If a post has any keywords you set (case-insensitive) it will automatically be linked. If "broccoli" was your keyword, use this sentence as an example:
"Broccoli is my favorite vegetable. My favorite way to eat broccoli is with salt and butter."
Mai Link Injector will dynamically add links to the text, keeping the case as-is:
"Broccoli is my favorite vegetable. My favorite way to eat broccoli is with salt and butter."
Usage
1. Visit Dashboard Mai Theme Link Injector (if using Mai Theme) or Dashboard Settings Mai Link Injector.
2. Add links and optionally modify settings.
3. That's it!
Programmatic Usage
Programmatically add links via the mailinkinjectorlinks filter.
Programmatic Usage - Dynamic example
This example automatically gets all of the post categories and uses the category name as the keyword(s) and the category archive url as the url. Any post with a same text as a category name will automatically have a link to that category archive.
Limiting elements
Text within the following elements will not have links created:
Elements with a m