WP Manifestindependent plugin directory
manifest / editor / paragraph-link-relations

Paragraph Link Relations

WordPress plugin that adds a link relations option to inside paragraph blocks in the block editor.

by Jeremy Techtmann · github.com/removement/paragraph-link-relations

★ 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/removement/paragraph-link-relations/archive/refs/heads/master.zip

Adds an Additional link relations option to the link popup when you add or edit links inside paragraph blocks in the WordPress block editor. You can set custom rel values (e.g. sponsored, ugc) on inline links without touching code.

What it does

When you select text in a paragraph and add a link (or edit an existing link), the link popup includes an Advanced section. This plugin adds a fourth option there:

  • Additional link relations — A checkbox that, when enabled, shows a text field. Whatever you enter is added to the link’s rel attribute (space-separated), in addition to any core options like “Open in new window” and “Mark as nofollow.”

Example: entering sponsored ugc produces <a href="..." rel="nofollow sponsored ugc"> if “Mark as nofollow” is also checked.

Requirements

  • WordPress 5.0 or later (block editor)
  • No other plugins required

Installation

  1. Ensure the plugin folder paragraph-link-relations is in your wp-content/plugins directory.
  2. In WordPress Admin → Plugins, find Paragraph Link Relations and click Activate.

Usage

  1. Add or focus a Paragraph block.
  2. Select the text you want to turn into a link (or click an existing link).
  3. Use the link button in the toolbar (or Ctrl+K / Cmd+K).
  4. Enter or edit the URL as usual.
  5. In the Advanced section, check Additional link relations and type the rel values (e.g. sponsored, ugc), separated by spaces.
  6. Apply the link. The saved markup will include your custom rel values.

Unchecking Additional link relations clears the value and removes those rels from the link when you save.

How it works

The block editor’s inline link UI doesn’t expose a way to add custom fields. This plugin re-registers the core link format with an extended edit component that adds the “Additional link relations” setting and merges your input into the <a rel="..."> attribute when the link is saved.

By

This plugin was created by Jeremy Techtmann from removement

License

GPL v2 or later. See the main plugin file or gnu.org/licenses/gpl-2.0.html.