Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,705 Points

Removing SSL Mixed Content

Hi :)

I recently purchased SSL for this website, https://www.elimchurchbishopauckland.co.uk/

I've since been trying to flush out mixed content on the site, that is content still being served over HTTP:// rather than HTTPS://

If you go to the website there's still 1 error message on the site over this stylesheet.

<link rel='stylesheet' id='tws-source-css'  href='http://fonts.googleapis.com/css?family=Open+Sans%3A400%2C300%2C300italic&#038;ver=1.0' type='text/css' media='' />

which returns...

Mixed Content: The page at 'https://www.elimchurchbishopauckland.co.uk/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Open+Sans%3A400%2C300%2C300italic&ver=1.0'. This request has been blocked; the content must be served over HTTPS.

... in the console.

It's a WordPress site so the obvious answer is to look for the code directly in the templates and remove it.

I cannot find a reference to that line at all in the page. I'd rather eliminate all errrors from the console but the site still holds it's Secure tag. It's one Google font stylesheet? Is there any danger of attackers hacking the site through that?

Joel Bardsley
Joel Bardsley
31,242 Points

Have you checked the functions.php file for a reference to it being applied using the wp_enqueue_style() function?

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

I can't find any references to it in either the main or child theme.

My main tactic has been to use a search and replace plugin to switch links from HTTP:// to HTTPS://. That's the last one that won't change.

Do you mind sharing what theme?

You've also disabled all plugins to make sure it isn't one of them?

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

So, I've just had to put a maintenance plugin on it because it looks like support for the theme has been dropped. I'm not 100% sure on this but i don't think it uses any external styles but if it does, those may have been taken down too. So I either need to look for a new theme, or try and fix the styles myself.

Does this sound like something that could happen for a genesis theme?

Without seeing code for the theme its hard to say but it is there somewhere either in the theme/child theme or a plugin is adding that.

I'm more that willing to take a look through the theme/child theme if you are willing to share.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

Hi Mark,

All the plugins except the maintenance plugin are now switched off, so I don't think it's a problem with that.

I don't think I should, unless you can think of a secure, password-free way to do share :)

If you have a github account we could do it that way so its shared and only viewable via my account.

Other options would be onedrive, dropbox, google drive etc.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

Hi Matt,

I'm not comfortable copying the code into a repository I'm afraid, especially as it's a client project. Maybe you could look at it via Teamviewer or LogMeIn if we could arrange that? :-)

That would work as well.

Do you have a preferred chat program as well?

email is matruitt@live.com if you would prefer to send a invite from Teamviewer.

2 Answers

Thanks Jacob but we figured out the issue, it was nested inside the theme in a odd location.

if you are still having trouble enqueuing fonts into your WP site I suggest reading this blog post here this will give you a break down of how to enqueue fonts into your theme.