Showing posts with label SSL. Show all posts
Showing posts with label SSL. Show all posts

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);