WP Manifestindependent plugin directory
manifest / content / p2p-shortcode-resolver

P2P Shortcode Resolver

A WordPress plugin that resolves legacy `[p2p type="slug" value="post-slug"]link text[/p2p]` shortcodes left behind by the old Posts 2 Posts plugin.

★ 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/norbusan/p2p-shortcode-resolver/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.

A WordPress plugin that resolves legacy [p2p type="slug" value="post-slug"]link text[/p2p] shortcodes left behind by the old Posts 2 Posts plugin.

  • Requires: WordPress 5.0+
  • Tested up to: 7.0
  • License: GPLv2 or later
  • Stable tag: 1.0.0

Description

If your blog still contains shortcodes like:

[p2p type="slug" value="joshua-tree-climbing"]ジョシュアツリー[/p2p]

this plugin will render them as internal links to the referenced post (looked up by slug), using the inner text as the anchor. No database changes are made — the shortcodes stay in your content untouched.

Supported attributes

Attribute Description
type="slug" (default) Looks up a post by its post_name (slug). Aliases: post_name, name.
type="id" Looks up a post by numeric ID.
value="..." The slug or ID to resolve.

Behavior

  • If the post cannot be found, the inner text is rendered as plain text so the page never breaks.
  • If the shortcode has no inner text, the target post's title is used as the link label.
  • Lookups are cached for an hour via wp_cache_*.

Installation

  1. Copy the p2p-shortcode directory into wp-content/plugins/.
  2. Activate P2P Shortcode Resolver in the WordPress admin under Plugins.
  3. Legacy [p2p] shortcodes in your content will now resolve to links automatically.

Changelog

1.0.0

  • Initial release.

License

Distributed under the GPLv2 or later.