I am in the process of implementing SSL on some of my wordpress-powered site\'s pages. Currently I\'m getting mixed content warnings on the secured pages - my custom theme inclu
if you only want to make sure there is no mixed content when an HTTPS request is made, try adding simple code snippet to the "function.php" file of the current theme.
function _bd_force_https()
{
if ( empty( $_SERVER['HTTPS'] ) ) return;
ob_start();
}
add_action( 'template_redirect', '_bd_force_https', 1 );
function _bd_output_https_page()
{
if ( empty( $_SERVER['HTTPS'] ) ) return;
echo str_ireplace( 'http://', 'https://', ob_get_clean() );
}
add_action( 'wp_footer', '_bd_output_https_page', 99 );
PROS:
CONS: