Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@grola
Created January 19, 2018 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grola/831cb86bbf279264c4581e66bb8a32b8 to your computer and use it in GitHub Desktop.
Save grola/831cb86bbf279264c4581e66bb8a32b8 to your computer and use it in GitHub Desktop.
YOAST https:// cannonical URLs
function swp_wpseo_canonical_ssl( $url ) {
$url = str_replace( 'http://', 'https://', $url );
return $url;
}
add_filter( 'wpseo_canonical', 'swp_wpseo_canonical_ssl' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment