<?php

/**
 * Redirect guests to HTTP
 *
 * Redirect not logged-in users to the non-https version of a page.
 */
function redirect_lo_http($redirect_url) {
    if (!(
is_404() || is_user_logged_in()) && is_ssl()) {
        
header('Vary: Cookie'false);
        
wp_redirect('http://' $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301);
        exit;
    }
}
add_action('template_redirect''redirect_lo_http'2000);