{"id":419,"date":"2015-06-24T15:37:59","date_gmt":"2015-06-24T19:37:59","guid":{"rendered":"http:\/\/www.amixa.com\/blog\/?p=419"},"modified":"2015-06-24T15:37:59","modified_gmt":"2015-06-24T19:37:59","slug":"wordpress-and-google-fonts-http-and-https-error-messages-and-resolutions","status":"publish","type":"post","link":"https:\/\/www.amixa.com\/blog\/2015\/06\/24\/wordpress-and-google-fonts-http-and-https-error-messages-and-resolutions\/","title":{"rendered":"WordPress and Google Fonts HTTP and HTTPS error messages and resolutions&#8230;"},"content":{"rendered":"<p>If you are trying to deal with the dreaded insecure messages when trying to use Google Fonts on WordPress based sites, here are a few things to try. Within the specific theme folder you are using, edit the functions.php file. You want to examine the file and search\/look for &#8220;googleapis&#8221;.\u00a0 That should help you find the correct area of the code. In my example site (below), notice how the url is referenced as &#8220;\/\/fonts.googleapis.com&#8221; and not as &#8220;http:\/\/fonts&#8230;&#8221;.<\/p>\n<p>Make sure your theme is using just &#8220;\/\/fonts.googleapis&#8230;&#8221; and is not hard coded to HTTP or HTTPS<\/p>\n<pre>\/\/ Retrieve Font URL to register default Google Fonts\r\nfunction courage_google_fonts_url() {\r\n\u00a0\u00a0\u00a0 \r\n\u00a0$font_families = array('Lato', 'Fjalla One');<\/pre>\n<pre>\u00a0$query_args = array(\r\n\u00a0\u00a0'family' =&gt; urlencode( implode( '|', $font_families ) ),\r\n\u00a0\u00a0'subset' =&gt; urlencode( 'latin,latin-ext' ),\r\n\u00a0);<\/pre>\n<pre>\u00a0$fonts_url = add_query_arg( $query_args, '\/\/fonts.googleapis.com\/css' );<\/pre>\n<pre>\u00a0\u00a0\u00a0 return apply_filters( 'courage_google_fonts_url', $fonts_url );\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>If you make these changes and this does not help, or if you cannot locate similar\u00a0code in the functions\u00a0file &#8211; and you&#8217;re still getting the SSL warning messages on your site, then you&#8217;re probably at the mercy of a specific plugin, or issue with your particular theme.<\/p>\n<p>Try shifting the site to a basic theme like 2015 (for a few minutes for testing&#8230;) and see if the site works fine in http\/https modes with the google fonts.\u00a0 If it DOES, then the issue is your theme.\u00a0 Contact the theme developer or look hard through the theme code and determine where the googleapis call is.<\/p>\n<p>If the theme does not seem to be the issue, then it&#8217;s probably a plugin that&#8217;s causing your issues.\u00a0 If you feel brave, disable the plugins and start testing one after another to try and localize which plugin is causing the issue.\u00a0 (Disable all of them. Test the site.\u00a0 See if the fonts work without issue.\u00a0 Enable one plugin.\u00a0 Test again, enable another plugin, more testing, etc.)<\/p>\n<p>Hope that helps a bit!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are trying to deal with the dreaded insecure messages when trying to use Google Fonts on WordPress based sites, here are a few things to try. Within the specific theme folder you are using, edit the functions.php file. You want to examine the file and search\/look for &#8220;googleapis&#8221;.\u00a0 That should help you find the correct area of the<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,60,101],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-random-bits","tag-google-fonts","tag-html-and-css","tag-ssl"],"_links":{"self":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":1,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amixa.com\/blog\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}