0

I have a wordpress shop site with the headway theme being used. I have tried all sorts of caching plugins to no avail, the only cache that works well is the headway theme cache which is built in. So i really want to use it.

The problem is when the cache is turned on when the first visit to the website is http it immediately creates a cached css file. The very first line in that css is @import url(http://fonts.googleapis.com/css?family=Lato); which causes a ssl security warning.

If i clear the cache and the first page i click is a https page i can see in the cached css file the 1st line is @import url(https://fonts.googleapis.com/css?family=Lato); and this causes no error, a happy certificate.

Headway don't have an answer for me.

So is there anything i can do with htaccess to force this line inside that css file to be seen as https or maybe use a php function in wordpress to check that line. Which would then enable me to be able to use the caching system.

I'm sure there must be a way

BenMorel
  • 34,448
  • 50
  • 182
  • 322
djbridger
  • 35
  • 10
  • Does `@import url(//fonts.googleapis.com/css?family=Lato);` work? – Salman A Jan 31 '13 at 08:32
  • What is the "ssl security error"? A guess but have you looked at protocol less URLs? http://stackoverflow.com/questions/4831741/can-i-change-all-my-http-links-to-just – andyb Jan 31 '13 at 08:34
  • @Salman You have to be careful editing css files in 3rd party themes (unless you make a child theme which extends the desired theme). If the OP updates the theme, changes will be lost. – Adam Tomat Jan 31 '13 at 08:35
  • Its a partial content error as it reads the call to http://fontsgoogle not https – djbridger Jan 31 '13 at 08:42
  • i canot change it to protocol less as it seems its built into the theme and i cannot fish it out any where – djbridger Jan 31 '13 at 08:43
  • the cached css file is being written to /wp-content/uploads/headway/cache/ if that helps? – djbridger Jan 31 '13 at 08:49
  • @import url(//fonts.googleapis.com/css?family=Lato); does – djbridger Jan 31 '13 at 09:44

1 Answers1

0

Can you add the css in the header (so it gets called before the cache css). I don't really know Wordpress all that well but in your themes header.php file, why don't you add the style sheet manually so it gets cached from https either way:

<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Lato' type='text/css' />
garethb
  • 3,951
  • 6
  • 32
  • 52