Force SSL on Dedicated Pages

If you want to force SSL on dedicated pages, use the snippet below:

function snippet_force_ssl( $force_ssl, $post_id = 0, $url = '' ) {
    if ( $post_id == 21 ) { // change 21 to your post / page id
        return true
    }
    return $force_ssl;
}

add_filter('force_ssl' , 'snippet_force_ssl', 10, 3);