-
-
Save ARCHTKT/5c70306c7b75de1172be312a369a714f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* No copiar esta linea */ | |
//Redirigir de /?amp a su canonical para no perder ese tráfico | |
add_action( 'template_redirect', 'archtkt_redirect_amp' ); | |
function archtkt_redirect_amp() { | |
if ( isset( $_GET['amp'] ) ) { | |
wp_safe_redirect( remove_query_arg( 'amp' ), 301 ); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment