Skip to content

Instantly share code, notes, and snippets.

@ovizii
Created April 10, 2014 15:22
Show Gist options
  • Save ovizii/10393503 to your computer and use it in GitHub Desktop.
Save ovizii/10393503 to your computer and use it in GitHub Desktop.
Force SSL/HTTPS on Specific Post IDs
function wps_force_ssl( $force_ssl, $post_id = 0, $url = '' ) {
if ( $post_id == 25 ) {
return true
}
return $force_ssl;
}
add_filter('force_ssl' , 'wps_force_ssl', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment