Support › Forums › Sunshine Pro Theme › Alternate mobile logo and SSL
Tagged: alternate mobile logo, ssl
- This topic has 2 replies, 2 voices, and was last updated 4 years, 3 months ago by
swest.
-
AuthorPosts
-
October 5, 2016 at 3:09 pm #1353
swest
ParticipantI am using Sunshine Pro on a client site and we just got a SSL cert (Let’s Encrypt on WPEngine) and everything works except the Alternate Mobile Logo. We are getting Mixed Content warnings for the mobile-logo. The normal logo appears correctly and is served via https:// but the mobile-logo remains being served via http://.
<div class="title-area"><a href="https://finkegardens.com/" title="Finke Gardens & Nursery"><img alt="Finke Gardens & Nursery" title="Finke Gardens & Nursery" width="760" height="110" id="logo" srcset="https://finkegardens.com/wp-content/uploads/2016/03/mastheadlogo-2016.png, https://finkegardens.com/wp-content/uploads/2016/03/mastheadlogo-2016@2x.png 2x"><img alt="Finke Gardens & Nursery" title="Finke Gardens & Nursery" width="760" height="110" id="mobile_logo" srcset="http://finkegardens.com/wp-content/uploads/2016/03/mastheadlogo-2016-alt.png, http://finkegardens.com/wp-content/uploads/2016/03/mastheadlogo-2016-alt@2x.png 2x"></a><h1 class="site-title" itemprop="headline"><a href="https://finkegardens.com/" title="Finke Gardens & Nursery">Finke Gardens & Nursery</a></h1><p class="site-description" itemprop="description">bringing life to your home</p></div>
I think the code which I believes produces this markup comes from /lib/structure/header.php line 102, but I can’t see what might be wrong.
//* Alternate mobile logo $mob_logo = ''; $mobile_logo = get_option('finkegardens_altmob_logo'); if( $mobile_logo ) { list($mwidth, $mheight) = getimagesize( str_replace( trailingslashit( home_url() ), '', $mobile_logo ) ); $mob_logo = '<img src="' . $mobile_logo . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" width="' . $mwidth . '" height="' . $mheight . '" id="mobile_logo" />'; }
I’d appreciate any help you can give in resolving the Mixed Content Warnings for the mobile logo.
October 5, 2016 at 3:20 pm #1354Chinmoy Paul
ModeratorReplace
$mob_logo = '<img src="' . $mobile_logo . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" width="' . $mwidth . '" height="' . $mheight . '" id="mobile_logo" />';
WITH
$mob_logo = '<img src="' . preg_replace( '/^https?:/', '', $mobile_logo ) . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" width="' . $mwidth . '" height="' . $mheight . '" id="mobile_logo" />';
October 5, 2016 at 3:42 pm #1355swest
ParticipantThanks, that solved the problem.
-
AuthorPosts
- You must be logged in to reply to this topic.