Title: Error in the code
Last modified: March 9, 2017

---

# Error in the code

 *  Resolved [Sergey Kovalets](https://wordpress.org/support/users/sergeykovalets/)
 * (@sergeykovalets)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/error-in-the-code-2/)
 * functions.php contains a string [https://fonts.googleapis.com/css](https://fonts.googleapis.com/css)
   
   Page does not exist. (404 error)
 * `$font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );`
 * and [https://fonts.gstatic.com](https://fonts.gstatic.com)
 *     ```
       function twentyfourteen_resource_hints( $urls, $relation_type ) {
       	if ( wp_style_is( 'twentyfourteen-lato', 'queue' ) && 'preconnect' === $relation_type ) {
       		if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) {
       			$urls[] = array(
       				'href' => 'https://fonts.gstatic.com',
       				'crossorigin',
       			);
       		} else {
       			$urls[] = 'https://fonts.gstatic.com';
       		}
       	}
   
       	return $urls;
       ```
   
    -  This topic was modified 9 years, 3 months ago by [Sergey Kovalets](https://wordpress.org/support/users/sergeykovalets/).

Viewing 1 replies (of 1 total)

 *  Moderator [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * WordPress Dev
 * [9 years ago](https://wordpress.org/support/topic/error-in-the-code-2/#post-9157564)
 * It’s not an error, those URLs are not supposed to be opened directly 🙂
 * `https://fonts.googleapis.com/css` works fine, it just needs a font name, which
   the theme does specify: [https://fonts.googleapis.com/css?family=Lato%3A300%2C400%2C700%2C900%2C300italic%2C400italic%2C700italic&subset=latin%2Clatin-ext](https://fonts.googleapis.com/css?family=Lato%3A300%2C400%2C700%2C900%2C300italic%2C400italic%2C700italic&subset=latin%2Clatin-ext)
 * `https://fonts.gstatic.com` works fine as well, it needs a file name, e.g. [https://fonts.gstatic.com/s/lato/v13/dPJ5r9gl3kK6ijoeP1IRsvY6323mHUZFJMgTvxaG2iE.woff2](https://fonts.gstatic.com/s/lato/v13/dPJ5r9gl3kK6ijoeP1IRsvY6323mHUZFJMgTvxaG2iE.woff2),
   which is specified in the `@font-face` blocks in the CSS loaded from `fonts.googleapis.
   com/css`.
 * The theme uses `fonts.gstatic.com` as a `rel='preconnect'` link:
 *     ```
       <link href='https://fonts.gstatic.com' crossorigin rel='preconnect' />
       ```
   
 * as per Google recommendations: [https://core.trac.wordpress.org/ticket/37171#comment:7](https://core.trac.wordpress.org/ticket/37171#comment:7)
 * The URL in that line cannot be opened directly, but it’s not supposed to be opened
   that way, as it’s an instruction for the browser to preconnect to the domain,
   not a regular link.

Viewing 1 replies (of 1 total)

The topic ‘Error in the code’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentyfourteen/4.5/screenshot.
   png)
 * Twenty Fourteen
 * [Support Threads](https://wordpress.org/support/theme/twentyfourteen/)
 * [Active Topics](https://wordpress.org/support/theme/twentyfourteen/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentyfourteen/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentyfourteen/reviews/)

## Tags

 * [style](https://wordpress.org/support/topic-tag/style/)
 * [Twenty Fourteen](https://wordpress.org/support/topic-tag/twenty-fourteen/)

 * 1 reply
 * 2 participants
 * Last reply from: [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/error-in-the-code-2/#post-9157564)
 * Status: resolved