Hi there,
Please could you try adding the following to your theme’s functions.php file:
function metaslider_protocol_relative_urls($cropped_url, $orig_url) {
return str_replace('http://', '//', $cropped_url);
}
add_filter('metaslider_resized_image_url', 'metaslider_protocol_relative_urls', 10, 2);
Thanks,
Dave
Hello
I have added this to functions.php in the code snippets plugin and it hasn’t resolved it. (I use code snippets as I havn’t used a child theme)
There are three options to select in the code snippets – add to the whole site, administration area only or front end only. Which one should I use. I have added it to the whole site.
Many thanks
Please – have you got any other ideas Astro how to rectify this
Thanks
Hi there,
Do you have a link to your site so I can see if the code is being applied?
Thanks,
Dave
Hi there,
You’re right in that the images are still using http:// and not https://
Can you make sure you have cleared the site cached if using a cacheing plugin?
Also, could you try add the code to the bottom of the theme’s functions.php file rather than using the plugin as I can’t be sure if this is added it correctly?
Thanks,
Dave
Hello
Thank you for your help, all OK now. Cleared the cache and it is now has ‘Secure’ on the home page.
Thanks
Jenny
Will this problem be fixed in next release of Metaslider?
WP fixed this problem a while ago, see example discussion:
https://core.trac.wordpress.org/ticket/15928
Would be even better if instead of a protocol relative URL, a path relative url is used, if possible, by removing the domain.
But any fix would be appreciated.