On this page
apply_filters( 'get_canonical_url', string $canonical_url, WP_Post $post )
Filters the canonical URL for a post.
Parameters
$canonical_urlstring-
The post's canonical URL.
$postWP_Post-
Post object.
Source
File: wp-includes/link-template.php. View all references
return apply_filters( 'get_canonical_url', $canonical_url, $post );
Related
Used By
| Used By | Description |
|---|---|
| wp_get_canonical_url() wp-includes/link-template.php | Returns the canonical URL for a post. |
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_canonical_url