the source action in


add_action( 'amp_post_template_head', 'amp_post_template_add_canonical' );
function amp_post_template_add_canonical( $amp_template ) {

<link rel="canonical" href="<?php echo esc_url( $amp_template->get( 'canonical_url' ) ); ?>" />


How I can edit rel from functions.php without editing main file? thanks.

Read more here: AMP – Change rel="canonical" from functions.php


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: