• Resolved pugman76

    (@pugman76)


    I switched my website to https, and when you click an image, the lightbox does not show up (it just goes to a black screen with a loading icon that keeps spinning). I switched it back to http, and it worked. Anyone know the trick on how to get it working with https?

    Thanks!

Viewing 1 replies (of 1 total)
  • I had the same issue, fixed by adding the following code to the functions.php file

    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 );
Viewing 1 replies (of 1 total)

The topic ‘Not working in https’ is closed to new replies.