Jump to content
the_hive

Ssl Switching

Recommended Posts

the_hive

Hi,

I am having an issue with the following page displaying insecure content:

https://semillasdeamor.org/donate/

 

The CSS was completely broken and below is the assessment from WPengine.

 

"That page is now excluded from our CDN. The assets are *not* loading from our CDN, and they page is still not displaying appropriately.

The problem is that your theme is not taking the protocol into account, and it is not changing http to https when it should, and as other themes do without a problem."

 

I have since changed the header and footer images to https: in Site Options, but they now display that way in the entire site.  From my understanding, the theme should be switching on its own for forced ssl pages.  Any ideas?

Thanks,

Joel

Share this post


Link to post
Share on other sites
Simon

What do you mean by 'forced ssl'? The framework uses whatever protocol WordPress is using, so if your site_url is https the so is the frameworks. If you using some kind of plugin to trick WordPress into being SSL for one page then your going to have to do the same for the framework.

So how are you doing it?

Share this post


Link to post
Share on other sites
Simon

well yea of course it is, but the CSS is only written once and cached, so if its cached on a non-ssl page the css is going to be non-ssl on the ssl page, if you follow.

 

So your choices are:

 

  • Force the CSS to never cache and re-generate on ever pageload (!)
  • Force the CSS to be SSL on all pages, including non-ssl pages.

 

add_action( 'pl_force_ssl', '__return_true' );
Use the above to force the css to be ssl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×