Error 404 /amp/ solved
-
Modify amp-fronted-actions.php with the next code:
<?php // Callbacks for adding AMP-related things to the main theme add_action( 'wp_head', 'amp_frontend_add_canonical' ); function amp_frontend_add_canonical() { if ( false === apply_filters( 'amp_frontend_show_canonical', true ) ) { return; } $amp_url = get_permalink( get_queried_object_id() ); printf( '<link rel="amphtml" href="%s?amp" />', esc_url( $amp_url ) ); }
The topic ‘Error 404 /amp/ solved’ is closed to new replies.