wpseek.com
A WordPress-centric search engine for devs and theme authors



get_canonical_url › WordPress Filter Hooks

Since4.6.0
Deprecatedn/a
apply_filters( 'get_canonical_url', $canonical_url, $post )
Parameters: (2)
  • (string) $canonical_url The post's canonical URL.
    Required: Yes
  • (WP_Post) $post Post object.
    Required: Yes
Defined at:
Codex:

Filters the canonical URL for a post.





Source

return apply_filters( 'get_canonical_url', $canonical_url, $post );