
Easily create a link to another post using a shortcode to reference the post by id or slug; the link text is the post’s title, unless overridden.
When writing your posts, you can refer to other posts either by ID, like so:
[post2post id="20"]
or by the post slug/name, like so:
[post2post id="hello-world"]
When viewed on your site, the post-to-post link tag is replaced with a permalink to the post you’ve referenced. By default, the text of the link will be the referenced post’s title, resulting in something like:
"<a href="http://example.com/archives/2005/04/01/hello-world/" title="Hellow World!">Hello World!</a>"
You can optionally customize the link text by specifying a text="" attribute and value to the post-to-post link tag:
Check out [post2post id="hello-world"]my first post[/post2post].
Which yields:
Check out "<a href="http://example.com/archives/2011/07/01/hello-world/" title="Hello World!">my first post</a>".
The plugin provides its own admin options page via Settings -> Post2Post in the WordPress admin. Here you can define text that you want to appear before and/or after each post-to-post substitution, and if you want to enable legacy tag support. The plugin’s admin page also provides some documentation.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
These are all valid ways to reference another of your posts on the same blog.
Assuming all of the above were used to reference the same post, the replacement for the post-to-post shortcut would be:
"<a href="http://example.com/2011/07/01/the-best-post-ever" title="The Best Post Ever!">The Best Post Ever!</a>"
For any of the above you can also optionally wrap the shortcode around text. If so defined, that text will be used as the link text as opposed to the referenced post’s title.
The first of which would produce:
"<a href="http://example.com/2011/07/01/the-best-post-ever" title="The Best Post Ever!">this post</a>"
You can also optionally definte the text that appears before and after the generated links. By default these are quotes.
Yields:
<a href="http://example.com/2011/07/01/the-best-post-ever" title="The Best Post Ever!">this post</a>!<h3>Legacy</h3>
The legacy syntaxes — which are disabled by default and not recommended for use unless you’ve used version of the plugin earlier than v3.0 — allow you to refer to other posts by ID using a pseudo-shortcode syntax or an HTML comment syntax, like so:
[post="20"] or `<!--post="20"-->`
or by the post slug/name, like so:
[post="hello-world"] or `<!--post="hello-world"-->.`
The HTML comment notation was the original syntax employed by earlier versions of this plugin (pre v2.0). While it is still supported, it is no longer the primary and recommended syntax. The pseudo-shortcode syntax was in use between v2.0 and v3.0 of the plugin.
NOTE: The HTML comment syntax notation does NOT play well with the visual (aka rich-text) editor in the WordPress admin.
Examples of old legacy syntax follow. Those that use the pseudo-shortcode syntax (i.e. [post=25]) only work if you’ve checked “Enable legacy pseudo-shortcode tag support?”. Those that use HTML comment notation (i.e. <!-- post="XX" -->) only work if you’ve checked “Enable legacy HTML comment-style tag support?”.
NOTE: Only activate the legacy mode(s) that apply to your use of older versions of the plugin. If you started using the plugin at v3.0 or later, you should not activate either legacy mode.
The plugin exposes one filter for hooking. Typically, customizations utilizing this hook would be put into your active theme’s functions.php file, or used by another plugin.
c2c_post2post_shortcode (filter)
The ‘c2c_post2post_shortcode’ hook allows you to define an alternative to the default shortcode tag. By default the shortcode tag name used is ‘post2post’. It is recommended you only utilize this filter before making use of the plugin’s shortcode in posts and pages. If you change the shortcode tag name, then any existing shortcodes using an older name will no longer work (unless you employ further coding efforts).
Arguments:
Example:
/** * Use a shorter shortcode: i.e. [p2p id="32"] * * @param string $shortcode The default shortcode name. * @return string The new shortcode name. */ function change_post2post_shortcde( $shortcode ) { return 'p2p'; } add_filter( 'c2c_post2post_shortcode', 'change_post2post_shortcde' ); Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Scott Reilly
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Use a contact form so visitors can send messages, submit inquiries, and help you collect leads and improve user experience.
Show verified customer feedback with Google Reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions.
Present your team with a structured team member list that builds trust, supports credibility, and helps visitors connect with the people behind your brand.
Present images in a Slideshow carousel that rotates or slides through visuals, helping you highlight key content within a clean, engaging layout.
Add interactive stories to your site to showcase content in a visual, mobile friendly format that boosts engagement and guides visitors toward action.

Use an engagement toolbox that combines forms, galleries, chats, and interactive elements to increase visitor activity and create a more engaging user experience.
Show Reddit posts with a Reddit feed that updates automatically, improves content discovery, and keeps visitors engaged with fresh discussions.
Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.
Add collapsible content sections to your site to organize information and help users navigate content more efficiently.
Showcase images with an image carousel that rotates or slides visuals, improves design, and draws attention to key content.
Add a call button to your site so visitors can tap to start a phone call instantly, improving direct communication access.
Show Glassdoor reviews to highlight employee feedback, strengthen employer brand, and help candidates trust your company.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
