Address choice
One destination, two address forms
A shortlink can identify the post by number or point to the address that currently resolves to it.
Query-string form
WordPress normally returns a query-string URL containing ?p= as the shortlink.
Post-owned address
The resolved post supplies its current address, so the returned value follows the destination readers should reach.
Resolution order
Find the page context before returning a value
01
When an ID is supplied
The plugin looks up that exact record and uses its current address.
02
When the request is singular
Without an ID, the post currently being viewed supplies the context for the returned address.
03
When nothing resolves
If neither a post nor its address is available, the value already received stays unchanged.
Exact boundary
The rest of the site stays untouched
Settings
No settings are added; there is nothing to configure.
Storage
No values or configuration are stored.
Public endpoint
No public endpoint is added.
Redirect
Requests are not redirected.
Content mutation
Post slugs, canonical tags, permalink settings, and content remain unchanged.
Output scope
The only changed value is the one returned by get_shortlink.
Requirements
The runtime must meet two requirements
One dependency supplies the page context; the other runs the package on the server.
6.0 or later
WordPress 6.0 or laterSupplies the native filter, singular request context, and post-address resolution.
7.4 or later
PHP 7.4 or laterRuns the plugin on the server.
Stable package
Get the package that changes the returned address
Download the stable ZIP to add the plugin; resolvable posts can then return the addresses they already own.
