Add SSL Secure to Specific Page

HTTPS (Secure Hypertext Transfer Protocol) is used instead of HTTP top protect your webpage, If your website has payment transactions with a 3rd party payment gateway like "Authorize.Net, Paypal.."

I recommend you to activate HTTPS for Better Protection.

To have HTTPS, SSL Certificate is needed to be installed on your server.
Activating SSL on your specific pages, Just copy and paste the below code in your themes functions.php 

function wordpress_ssl( $wp_ssl, $post_id = 0, $url = '' ) {
    if ( $post_id == 25 ) { // change your page ID here
        return true;
    }
    return $wp_ssl;
}
add_filter('wp_ssl' , 'wordpress_ssl', 10, 3);

3 comments:

  1. This would be great! I’m very very interested in the code… responsive web development

    ReplyDelete
  2. Hi Robert,

    i an help you with responsive web development. post me your personal email id

    ReplyDelete