the source action in

/amp/includes/amp-post-template-actions.php
is:

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' ) ); ?>" />

<?php
}

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

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


Solution:

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: