Created
January 19, 2018 16:37
-
-
Save grola/831cb86bbf279264c4581e66bb8a32b8 to your computer and use it in GitHub Desktop.
YOAST https:// cannonical URLs
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
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