Get canonical link

Since WP 4.6 there has been a core function for this: wp_get_canonical_url()

Call it with a post ID to get that post’s canonical URL, or in the loop without a post ID to get the current post’s canonical URL.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)