Skip to content

Instantly share code, notes, and snippets.

View seangates's full-sized avatar
Revvable

Sean Gates seangates

Revvable
View GitHub Profile
<?php
$using_ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_PORT'] == 443;
add_action('wp', 'check_ssl');
function check_ssl()
{
$page_id = 2;// Page ID 2 must be https
if (is_page($page_id) && !$using_ssl)
{
header('HTTP/1.1 301 Moved Permanently');