rel_canonical

Advertisement

Summery Summery

Outputs rel=canonical for singular queries.

Syntax Syntax

rel_canonical()

Source Source

File: wp-includes/link-template.php

			$canonical_url = get_comments_pagenum_link( $cpage );
		}
	}

	/**
	 * Filters the canonical URL for a post.
	 *
	 * @since 4.6.0
	 *
	 * @param string  $canonical_url The post's canonical URL.
	 * @param WP_Post $post          Post object.
	 */
	return apply_filters( 'get_canonical_url', $canonical_url, $post );
}

/**
 * Outputs rel=canonical for singular queries.

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 Adjusted to use wp_get_canonical_url().
2.9.0 Introduced.

Advertisement

Leave a Reply