Tagged: SSL
There’s only one item breaking my SSL lock. I got the following feedback at http://www.whynopadlock.com/check.php:
Insecure URL: http://lawdeal.com/ld/wp-content/themes/enfold/images/background-images/diagonal-thin-light.png
Found in: https://lawdeal.com/ld/wp-content/uploads/dynamic_avia/enfold.css?ver=1
I took a look at ‘/dynamic_avia/enfold.css?ver=1’ and didn’t see any reference to ‘diagonal-thin-light.png’.
Please help, thx
Hey lawyerly!
Please add this at the very bottom of functions.php:
function fix_ssl_upload_url( $url ) {
if ( is_ssl() )
$url = str_replace( 'http://', 'https://', $url );
return $url;
}
add_filter( 'upload_dir', 'fix_ssl_upload_url' );
Best regards,
Ismael
Will this be fixed in the next update or do we have to fix it after each update?
Hi!
No, we won’t add it to the next theme update but you can insert it into the child theme functions.php. The child theme code won’t be affected by a theme update. This is actually no bug in the theme code but the code Ismael posted will replace all http:// prefixes with https:// and you don’t need to change all urls manually. You could also edit all theme settings, posts, etc. and replace the http:// prefixes with https://. Alternatively you can also install this plugin: https://wordpress.org/plugins/wordpress-https/
Cheers!
Peter