Tagged: SSL
How to get around SSL error of insecure png logo img as attached below.
It is the only item keeping a successful green lock from appearing:
https://www.whynopadlock.com/
Hi aribann!
Please add following code to Functions.php file in Appearance > Editor
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
if(is_page(3498) )
{
$logo = "https://yourdomain.com/your-logo.png";
}
return $logo;
}
Best regards,
Yigit
Yigit
Thank You for that
Would you kindly edit your response to something like:
$logo = “https://xyz.com/wp-content/uploads/2014/12/xyz.png”;
:)
Hey!
You are welcome. I removed your link from the code i posted :) Let us know if you have any other questions or issues
Cheers!
Yigit
Very useful, can it be used on more than one page?
What would the code be to call the secure version of the transparent version of the logo as well?
Cheers,
A
Hey!
Yes, it’s possible to use it on more than one page. Follow the pattern of the is_page function here: https://codex.wordpress.org/Function_Reference/is_page
Cheers!
Ismael
Thanks Ismael, that worked a treat. Because I am also using the transparent version of the logo in the header, I need to be able to call that on an ssl connection for the page to fully validate.
How would I add the transparent version of the logo?
Cheers!
A
Hi!
Use this in the functions.php file:
add_filter('avf_logo_subtext', 'kriesi_logo_addition');
function kriesi_logo_addition($sub) {
$sub = '<img src="https://yoursite.com/wp-content/uploads/2015/03/sublogo.jpg" class="alternate" alt="" style="max-height: 88px;">';
return $sub;
}
Adjust the image url.
Regards,
Ismael